lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: search/query issue. sorting, match exact, match first etc
Date Mon, 02 Feb 2009 23:35:29 GMT

Have you checked hte archive for other discussions about implementing 
auto-complete functionality?  it'snot something i deal with much, but i 
kow it's been discussed.

your specific requirement that things starting with an exact match be 
ordered alphabeticly seems odd to me ... i suspect sorting by some sort of 
"popularity" or document booost might be better ... but either way i think 
the exact behavior you're looking for is oging to require a custom plugin 
-- i suspect using SpanStartQueries ona field type that uses ngram 
tokenization.  (looking into those concepts should help get you started)


: I am trying to utilize solr into an autocomplete thingy.
: 
: Let's assume I query for 'foo'.
: Assuming we work with case insensitive here.
: 
: I would like to have records returned in specific order. First all that
: have exact match, then all that start with Foo in alphabetical order,
: then all that contain the exact word (but not necessarily first) and
: lastly all matches where foo is anywhere within words.
: Any pointers are more than welcome. I am trying to find something in
: archives as well but no luck so far.
: 
: Example response when searching 'foo' or 'Foo':
: 
: Foo
: Foo AAA
: Foo BBB
: Gooo Foo
: Moo Foo
: xxxfoox
: Boo Foos
: 



-Hoss


Mime
View raw message