Re: Searching in paths

2006-03-15 Thread Chris Hostetter
: What about such solution: : Split path like string into smaller tokens and index them as seperate words eg: : #Top/World/Poland/# #Top/World/# #Top/# i would be careful about your use of the word "token" in that sentence, but yes indexing each of the directory like paths as keywords and doing

Re: Searching in paths

2006-03-15 Thread kieran
Sorry, that should have read: Query query1 = null; if(cat!=""){ Term term = new Term("parentPath",cat); query1 = new TermQuery(term); Hits hits = is.search(query1); } ("parentPath" substituted for "category"). kieran wrote: Alternatively, you could examine each path, and index each of its

Re: Searching in paths

2006-03-15 Thread kieran
Alternatively, you could examine each path, and index each of its "parent" paths (perhaps in a field named "parentPath"). i.e. Top/World/Poland/Abc would result in the following three values being indexed: Top Top/World Top/World/Poland You can then use a TermQuery instead of a PrefixQuery. F

Re: Searching in paths

2006-03-15 Thread Java Programmer
Reply to myself hate this :( What about such solution: Split path like string into smaller tokens and index them as seperate words eg: #Top/World/Poland/# #Top/World/# #Top/# so if I ask about word #Top/# I will get all the results for this category, without making so many boolean queries. Is the

Re: Searching in paths

2006-03-15 Thread Java Programmer
On 3/14/06, Mordo, Aviran (EXP N-NANNATEK) <[EMAIL PROTECTED]> wrote: > You need to index the field as a keyword, or use an analyzer that will > not strip the / from the string > > Aviran > http://www.aviransplace.com Field is indexed as Keyword, I was using StandardAnalyzer(), but currently I try

RE: Searching in paths

2006-03-14 Thread Mordo, Aviran (EXP N-NANNATEK)
You need to index the field as a keyword, or use an analyzer that will not strip the / from the string Aviran http://www.aviransplace.com -Original Message- From: Java Programmer [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 14, 2006 11:28 AM To: java-user@lucene.apache.org Subject: Se