Provide abstraction for lucene-suggest build and lookup method

Description

lucene-suggest provides a library for doing Google style autosuggest lookup.

In order to provide this functionality an AnalyzingSuggester is provided that builds a dedicated index for this purpose through a "build" method.

Conversely, the suggester provides a lookup method, that returns hits against this index.

It would be nice to have this functionality integrated in HSEARCH.

Some ideas in relation to this:

  • builds are expensive, so should be executed by the user and can probably not be realtime/automatic

  • Early versions of lucene-suggest were in-memory based but there seems to have been some work in disk based indexes although documentation is a bit sparse

  • lookups could potentially be some kind of new method against the querybuilder. Although since you're executing against a different index, combining it with other Query elements would require an under the hood QueryTimeJoin on the id column which would prob be too much magic

Given the above, it would probably already be awesome if HSEARCH can provide a build abstraction, a mechanism for storing results on disk or memory and an analyzerfactory.

Some documentation

http://www.norconex.com/serving-autocomplete-suggestions-fast/

https://apache.googlesource.com/lucene-solr/+/4dfe64d7705025d787285cc0a34284d7c0c5236b/lucene/suggest/src/test/org/apache/lucene/search/suggest/analyzing/AnalyzingSuggesterTest.java

http://blog.mikemccandless.com/2014/01/finding-long-tail-suggestions-using.html

Environment

None

Assignee

Unassigned

Reporter

Marc Schipperheyn

Labels

None

Suitable for new contributors

Yes, likely

Pull Request

None

Feedback Requested

None

Fix versions

Priority

Major
Configure