lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: query boosting using a word list.
Date Sat, 06 Nov 2004 17:52:25 GMT
Hello Mark,

It sounds like you could extend QueryParser and override one of the
Query get***Query methods (getFieldQuery?), perhaps first calling the
super method, and then adding a boost based on the words, which you
would look up in your implementation of the getFieldQuery method.

Otis


--- Mark Page <mark@weballistics.com> wrote:

> Hi,
> 
> I have a database table of text flattend out and indexed.
> 
> Although searching with fuzzy query works well in most instances, on
> occasions however the target record appears way down the list of
> matching records.
> 
> This is because the query text may contain lots of irrelevant terms
> (in
> the context of the app) because the data is pulled from another
> source.
> 
> To solve this I need to create a word list, so that the terms that
> are
> important to the app are boosted in the search. as an example...
> 
> word list contains car manufacturers and models:-
> ...
> volkswagon
> golf
> polo
> ...
> 
> query text = "gleaming white 2-door volkswagon golf"
> 
> search = "gleaming white 2 door volkswagon^9 golf^9"
> 
> I can use regexes to massage the raw query text, but was wondering if
> there is a more elegant solution available within the Lucene API.
> 
> As a Lucene newbie any pointers or suggestion to solve what must be
> quite a common scenario appreciated. 
> 
> Regards, -Mark. 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message