Package-level declarations

Types

Link copied to clipboard

This processor verifies if ConfigurationKeys.ALLOW_LEADING_WILDCARD is defined in the QueryConfigHandler. If it is and leading wildcard is not allowed, it looks for every WildcardQueryNode contained in the query node tree and throws an exception if any of them has a leading wildcard ('*' or '?').

Link copied to clipboard

This processor verifies if ConfigurationKeys.ANALYZER is defined in the QueryConfigHandler. If it is and the analyzer is not null, it looks for every FieldQueryNode that is not WildcardQueryNode, FuzzyQueryNode or RangeQueryNode contained in the query node tree, then it applies the analyzer to that FieldQueryNode object.

If the analyzer return only one term, the returned term is set to the FieldQueryNode and it's returned.

If the analyzer return more than one term, a TokenizedPhraseQueryNode or MultiPhraseQueryNode is created, whether there is one or more terms at the same position, and it's returned.

If no term is returned by the analyzer a NoTokenFoundQueryNode object is returned.

Link copied to clipboard

This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children. This is a variant of BooleanModifiersQueryNodeProcessor which ignores precedence.

This processor removes every BooleanQueryNode that contains only one child and returns this child. If this child is ModifierQueryNode that was defined by the user. A modifier is not defined by the user when it's a BooleanModifierNode

Link copied to clipboard

This processor iterates the query node tree looking for every FieldableNode that has ConfigurationKeys.BOOST in its config. If there is, the boost is applied to that FieldableNode.

Link copied to clipboard

This processor verifies if ConfigurationKeys.PHRASE_SLOP is defined in the QueryConfigHandler. If it is, it looks for every TokenizedPhraseQueryNode and MultiPhraseQueryNode that does not have any SlopQueryNode applied to it and creates a SlopQueryNode and apply to it. The new SlopQueryNode has the same slop value defined in the configuration.

Link copied to clipboard

This processor iterates the query node tree looking for every FuzzyQueryNode, when this kind of node is found, it checks on the query configuration for ConfigurationKeys.FUZZY_CONFIG, gets the fuzzy prefix length and default similarity from it and set to the fuzzy node. For more information about fuzzy prefix length check: FuzzyQuery.

Link copied to clipboard

This processor makes sure that ConfigurationKeys.ANALYZER is defined in the QueryConfigHandler and injects this analyzer into IntervalQueryNodes.

Link copied to clipboard
Link copied to clipboard

This processor is used to expand terms so the query looks for the same term in different fields. It also boosts a query based on its field.

This processor looks for every FieldableNode contained in the query node tree. If a FieldableNode is found, it checks if there is a ConfigurationKeys.MULTI_FIELDS defined in the QueryConfigHandler. If there is, the FieldableNode is cloned N times and the clones are added to a BooleanQueryNode together with the original node. N is defined by the number of fields that it will be expanded to. The BooleanQueryNode is returned.

Link copied to clipboard
Link copied to clipboard

This processor removes invalid SlopQueryNode objects in the query node tree. A SlopQueryNode is invalid if its child is neither a TokenizedPhraseQueryNode nor a MultiPhraseQueryNode.

Link copied to clipboard

This processor is used to convert FieldQueryNodes to PointRangeQueryNodes. It looks for ConfigurationKeys.POINTS_CONFIG set in the FieldConfig of every FieldQueryNode found. If ConfigurationKeys.POINTS_CONFIG is found, it considers that FieldQueryNode to be a numeric query and convert it to PointRangeQueryNode with upper and lower inclusive and lower and upper equals to the value represented by the FieldQueryNode converted to Number. It means that field:1 is converted to field:1 TO 1.

Note that FieldQueryNodes children of a RangeQueryNode are ignored.

Link copied to clipboard

This processor is used to convert TermRangeQueryNodes to PointRangeQueryNodes. It looks for ConfigurationKeys.POINTS_CONFIG set in the FieldConfig of every TermRangeQueryNode found. If ConfigurationKeys.POINTS_CONFIG is found, it considers that TermRangeQueryNode to be a numeric range query and convert it to PointRangeQueryNode.

Link copied to clipboard

Processor for Regexp queries.

Link copied to clipboard

This processor removes every QueryNode that is not a leaf and has not children. If after processing the entire tree the root node is not a leaf and has no children, a MatchNoDocsQueryNode object is returned.
This processor is used at the end of a pipeline to avoid invalid query node tree structures like a GroupQueryNode or ModifierQueryNode with no children.

Link copied to clipboard

This pipeline has all the processors needed to process a query node tree, generated by StandardSyntaxParser, already assembled.

The order they are assembled affects the results.

This processor pipeline was designed to work with StandardQueryConfigHandler.

The result query node tree can be used to build a Query object using StandardQueryTreeBuilder.

Link copied to clipboard

This processors process TermRangeQueryNodes. It reads the lower and upper bounds value from the TermRangeQueryNode object and try to parse their values using a DateFormat. If the values cannot be parsed to a date value, it will only create the TermRangeQueryNode using the non-parsed values.

If a ConfigurationKeys.LOCALE is defined in the QueryConfigHandler it will be used to parse the date, otherwise Locale.getDefault will be used.

If a ConfigurationKeys.DATE_RESOLUTION is defined and the DateTools.Resolution is not \`null\` it will also be used to parse the date value.

Link copied to clipboard

The StandardSyntaxParser creates PrefixWildcardQueryNode nodes which have values containing the prefixed wildcard. However, Lucene PrefixQuery cannot contain the prefixed wildcard. So, this processor basically removed the prefixed wildcard from the PrefixWildcardQueryNode value.