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.
Exemple:
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 ....
Thanks.
Philippe
_________________________________________________________________
Trouvez l'âme soeur sur MSN Rencontres http://g.msn.fr/FR1000/9551
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
|