On Saturday 02 October 2004 02:06, [EMAIL PROTECTED] wrote: > The parameters are both string and numeric. For example, the model > should be Cargo and its HP value should be 55,000 or near it . If we > specify tolerance value of 5000 then it should search for all the data > files where model node is Cargo (definitive match) and HP value is > between 50,000 to 60,000 with the one having 55,000 coming as the 100% > match.
That's possible with Lucene, you'll need to parse the XML files and put the required data into the Lucene index. Then you can search with a query like this: +model:cargo^0 +hp:[50000 TO 60000] hp:55000^10 This will match all document which contain "cargo" in the model field and a value of 50000 to 60000 in the hp field. Matches with hp 55000 will be boosted so they appear on top. However, matches 50000 to 54999 and 50001 to 60000 will have the same ranking. To change that you will need to implement your own variation of Lucene's Similarity class. Regards Daniel -- http://www.danielnaber.de --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]