Autocomplete / query suggestion support in bleve

366 views
Skip to first unread message

katiyar...@gmail.com

unread,
Jun 9, 2016, 8:47:09 AM6/9/16
to bleve
I have already implemented search using bleve. Now I  am interested in providing user with a query suggester. Any idea if this is in the roadmap of bleve? If no can anybody help me find the resources to add this feature to bleve?

Cheers!

Marty Schoch

unread,
Jun 9, 2016, 8:57:44 AM6/9/16
to bl...@googlegroups.com
It has been discussed.  Many of the same data structures used for faster fuzzy/regexp/prefix searches are useful in this space too.  You can read some of the discussion here:


There are 3 things currently blocking addition to bleve in this area:

1.  It doesn't fit the existing index/mapping model.  Implementing this would most likely involve an in-memory data structure (possibly backed by disk).  Should the existence of this be declared in the mapping?  Should it just be instantiated at run-time via method calls?

2.  Others have convinced me that "good" suggestions will require more than just the contents of the term dictionary.  Lots of items in the dictionary make bad suggestions, and using *just* the document frequency as a weight is probably not what you want either.  This means that good suggestions will need to be augmented with something outside the index.  Again, this makes it feel less like it warrants a tight integration.

3.  Users really want a bleve 1.x and I agree it is long overdue.  Because of this I think our current solution is that we expose the term dictioanry throught the "FieldDict" methods:


This lets you get access to the term dictionary for a field, and the corresponding doc frequencies.  Users can use this to build a suggester outside of bleve.

We'll revisit this issue as a part of bleve 2 API considerations.

Those are my thoughts, but as always I welcome input from others.

marty

On Thu, Jun 9, 2016 at 8:46 AM, <katiyar...@gmail.com> wrote:
I have already implemented search using bleve. Now I  am interested in providing user with a query suggester. Any idea if this is in the roadmap of bleve? If no can anybody help me find the resources to add this feature to bleve?

Cheers!

--
You received this message because you are subscribed to the Google Groups "bleve" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bleve+un...@googlegroups.com.
To post to this group, send email to bl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bleve/feb159dd-d277-49b8-9a38-026526404d49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

katiyar...@gmail.com

unread,
Jun 9, 2016, 11:46:24 AM6/9/16
to bleve
Thanks Marty for quick reply.
I am new to this side of tech, so cant give any suggestions as of now. I'll go through issue on github and do some research to find out how I implement this.
One way of implementation I found was http://oldblog.antirez.com/post/autocomplete-with-redis.html, but this uses redis based data structures.
If you could point me to some resources that I could use to do my research would be helpful.

Cheers!
Suyash
Reply all
Reply to author
Forward
0 new messages