I know I am getting very close on this one but can't seem to get the score above .306. My guess is that I need to do something different in my query. If at all possible, could you take a quick look at my test code and point me in the correct direction? I know everyone is very busy, so any help would be greatly appreciated.
> > : 1.) I have data like name="Jeff" lastname="Richley" age="33" and I need > to > : be able to query by any combination such as name="Jeff" age="33". But > if > : I query with name="Jeffrey" there is no match. > : > : 2.) The name value pairs are not really controlled until the end user is > : inserting information or querying. I may have the data from the > previous > : example and then have another that has address information and then > : something totally unrelated such as stock prices. The point is, I can't > : guarantee what exactly will be in the data. > > Lucene will fit your needs because of your second point nicely, Documents > don't need to all have hte same fields. > > as to your first point, and your question about 100% matches, Lucene > should be able to meet your needs perfectly, you just have to understand > how to ask it the right question. lemme give you a quick check list of > things to keep in mind, and as you dig into the documentation these will > make more sense... > > 1) Use only UN_TOKENIZED fields when adding your documents, and if you > use QueryParser to build your queries for you, use the KeywordAnalyzer to > make sure no lowercasing or stemming takes place. > 2) OMIT_NORMs when indexing .. they only matter if you want the lengths > of fields to affect the score, and you don't -- you only want to know if > it matched or not. > 3) if you want to require name="jeff" and age="33" make sure you > construct a query where all clauses are mandatory .. the default in the > query parser is "SHOULD" meaning only one clause is mandatory, and the > other clauses increase the score. > > > > -Hoss > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > Jeff Richley, Vice President Southeast Virginia Java Users Group [EMAIL PROTECTED] http://www.sevajug.org
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]