Let's go to some example: 1 - Suppose I have some path tree, like: - /music/ | - rock/ | - doc1 = "artist1 music blues ..." | - doc2 = "artist2 music pop ..." | - blues/ | - doc3 = "artist3 ..." | - pop/ - doc5 = "artist1 ... " | - pop/ | - doc4 = "artist1 music rock ..."
2 - I created lucene documents like this example: field1 = ("path", doc1fullpath) field2 = ("value", doc1Value) and do the same to all documents. 3 - now I going to do the search: $ rock I get some sort like: [doc4, doc1, doc2] but I want: [doc1 | doc2] and the others [doc3 & doc4] like doc1, doc2, doc4 $ music AND blues I get: doc1, doc3 but I want: doc3, doc1 $ pop I want: doc4 then doc5 (because the path to doc4 is smaller then doc5) So to do this I need: 1 - change field boost 2 - set priority of path, and to do that: I create N field (one field to node in the path) or have some Lucene feature (but I don't know how) Thanks. ______________ Iam Jabour On Wed, Sep 15, 2010 at 12:52 PM, Steven A Rowe <sar...@syr.edu> wrote: > Hi Iam, > > Can you say why you don't like the proposed solution? > > Also, the example of the scoring you're looking for doesn't appear to be > hierarchical in nature - can you give illustrate the relationship between the > tokens in [token1, token2, token3]? Also, why do you want token1 to > contribute more to the score than token2? > > Steve > >> -----Original Message----- >> From: Iam Jabour [mailto:iamjab...@gmail.com] >> Sent: Wednesday, September 15, 2010 9:20 AM >> To: lucene-group >> Subject: Hierarchical Fields >> >> Hello, any one can help me with fields? >> >> I have the same problem posted in >> http://search.lucidimagination.com/search/out?u=http://wiki.apache.org/luc >> ene-java/HierarchicalFields, >> but I don't like the proposed solutions. I need a order field, like [ >> token1, token2, token3] >> If a query match with token1 the score is bigger then a match in >> token2, or same thing like that. >> >> ______________ >> Iam Jabour >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org