lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil brunet" <>
Subject Performing exact search with Lucene
Date Fri, 02 Apr 2004 15:12:05 GMT
Hi all.

I'm migrating a part of an application from Oracle intermedia to Lucene 
(1.3) to perform full text searches.

I'd like to know if there is a way to perform "exact queries". By "exact 
query", i mean beeing able to match ONLY document that are exactely equals 
to the terms of the query.


document 1 =    "this is an example"
document 2 =    "this is an example of document"
document 3 =    "this is an other example "

Is it possible to match ONLY document 1 if i search for "this is an exemple" 

Currently, i'm trying to override the DefaultSimilarity class in order to be 
be able to deduce an exact match from the score.

My query consists in a BooleanQuery composed by n TermQuery.

I know i can develop by myself a "post filter" that could count compare the 
number of tokens of the query and the number of tokens of the indexed 
document. But i would like to know if there is a proper way to do this :
-> directly with Lucene (i.e. a Lucene query that would match only document 
1 in my example)
-> by redefining the Similarity and so by "interpreting" the scores
-> any idea ....



Trouvez l'âme soeur sur MSN Rencontres

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message