type ahead - suggest words with facet.prefix, but with original case (or another solution?)
Hello, I'm just thinking about a solution for a type ahead functionality that shall suggest terms that the user can search for, and that displays how many docs are behind that search (like google suggest). When I use facet.prefix and facet.field=text, where text is my catchall field (and default field for searching), then only lowercased words are suggested, not orgininal ones. And I want to have it independent from the users input - it should not matter if the user enters fo or Fo, I always want to have Foo suggested if this words exists in my docs. Is that possible? AFAICS the limitation of this approach is, that it is limited to single words. E.g. when the user enters foo ba, then he would not get Foo Bar as a suggestion (asuming that my catchall field contains tokenized terms). What do you think of this: Asuming I have my own RequestHandler, I would split the users input to get the last word, and use everything but this last word as query, to limit the resulting docs (my default operator is AND). Afterwards I search for terms starting with the last word and do standard faceting stuff (calculate number of docs for each term). Are there other/better approaches/solutions for type ahead functionality that you would recommend? Btw: my docs contain products with the main fields name, cat, type, tags, brand, color - these are used for searching (copied into the text field). Thanx in advance, cheers, Martin signature.asc Description: This is a digitally signed message part
Re: GET_SCORES flag in SolrIndexSearcher
On 10/19/07, Chris Hostetter [EMAIL PROTECTED] wrote: (it doesn't matter that parseSort returns null when the sort string is just score ... SolrIndexSearcher recognizes a null Sort as being the default sort by score) Yep... FYI, I did this early on specifically because no sort and score desc get you the same results from Lucene's IndexSearcher.search(), but they take different code paths (the former being slightly faster). -Yonik
grouped clause search in dismax
I have a dismax handler to match product names found in free text that looks like: !-- for thing detection -- requestHandler name=thing class=solr.DisMaxRequestHandler lst name=defaults str name=echoParamsexplicit/str float name=tie0.01/float str name=qf name^5 nec_name^3 ne_name /str str name=fl * /str int name=ps100/int str name=q.alt*:*/str /lst /requestHandler name is type string, nec_name and ne_name are special types that do domain-specific stopword removal, latin1 munging etc, all are confirmed working fine on their own. Say I have a product called SUPERBOT and I want the text I love SUPERBOT to match the product SUPERBOT pretty high. In Lucene or Solr on its own you'd do something like: name:(I love SUPERBOT)^5 nec_name:(I love SUPERBOT)^3 ne_name:(I love SUPERBOT) which works fine. And so does: qt=thingq=SUPERBOT But this doesn't work: qt=thingq=(I%20love%20SUPERBOT) nor does qt=thingq=I%20love%20SUPERBOT -- they get no results. How can we do grouped clause queries in dismax?
Re: grouped clause search in dismax
: Say I have a product called SUPERBOT and I want the text I love SUPERBOT : to match the product SUPERBOT pretty high. The issue you're having is that by default, a document won't match a dismax query unless all of the words in the query string match on at least one of the qf fields ... use the mm param to make this more lenient. -Hoss