I need to use autocomplete with edismax (ngrams,edgegrams) to return shingled
suggestions. Field value "new york city" needs to return on query "ne" ->
"new","new york","new york city". With suggester this is easy. But im forced
to use edismax because I need to apply mutliple filter queries.
> I need to use autocomplete with edismax (ngrams,edgegrams) to return
> suggestions. Field value "new york city" needs to return on query "ne" ->
> "new","new york","new york city". With suggester this is easy. But im
> to use edismax because I need to apply mutliple filter queries.
> What is best approach to deal with this?
> Any suggestions are appreciated.
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html >
So, your problem is you want to return shingle suggestions from a field in
input but apply multiple filter queries to the documents you want to fetch
Are you building an auxiliary index for that ?
You need to design it accordingly.
If you want to to map each suggestion to a single document in the auxiliary
index, when you build this auxiliary index you need to calculate the
shingles client side and push the multiple documents ( suggestion) per
original field content.
To do that automatically in Solr I was thinking you could write an
UpdateRequestProcessor that given in input the document, split it in
multiple docs, but unfortunately the current architecture of
UpdateRequestProcessors takes in input 1 Doc and and returns in output just
So it is not a viable approach.
Unfortunately the shingle filter here doesn't help, as the user want shingle
in output ( analysers doesn't affect stored content)
Yes, faceting will work, you can use an old approach used for
Be sure you add the shingle filter to the appropriate index time analysis
for the field you want.
Facet values are extracted from the indexed terms, so calculating faceting
and filtering by prefix should do the trick.