Skip navigation links

Package com.exalead.search.query.prefix

A Visitor class that provides callbacks on Prefix nodes to do custom processing on query branches, such as "lang:(fr OR de)".
This package includes a small extensible framework to handle custom prefix, as well as some implementations for default prefixes such as full-text, category or date.

See: Description

Package com.exalead.search.query.prefix Description

A Visitor class that provides callbacks on Prefix nodes to do custom processing on query branches, such as "lang:(fr OR de)".
This package includes a small extensible framework to handle custom prefix, as well as some implementations for default prefixes such as full-text, category or date.

PrefixSupervisor visitor

This is the visitor to add in the QueryProcessor to support prefixes.
It calls back the registered PrefixHandlers when stumbling upon Prefix nodes. It supports nesting, calling sequentially a full-text prefix handler then a approximate prefix handler when visiting a tree like "text:("vorpal sword" AND spellslike:jaberwok)"

Current implementation defines three sets of callbacks:

PrefixHandlers

Interface. PrefixHandler is the interface defining the three callbacks used by the PrefixSupervisor visitor.

Implementations. Class AlphanumPrefix provides the callbacks needed to target a set of index field. E.g. prefix "text" could target fields "title" and "body", and a query "text:(looking glass)" would result in a final tree (title=looking AND title=glass) OR (body=looking AND body=glass)
Classes NumericalPrefix and DatePrefix provide callbacks needed to target index fields of type numerical, date and time. These prefixes do not support nesting.

Skip navigation links

Copyright © 2013 Dassault Systèmes, All Rights Reserved.