lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karthik N S" <kart...@controlnet.co.in>
Subject RE: Range Query Sombody HELP please
Date Mon, 31 May 2004 11:47:08 GMT
Hey Ype...

1) I switched Off the Multi search Senerio.

2) Changing the Field type from Text to Keyword
    will fail When I search for the the Field type  "filename"
    so,I still maintained it to be Text

D:\JAVA\lucene\src\demo>java org.lucene.src.indexer.search.SearchFiles
Search Keyword : b10181_p388
Source path [ E:/po/aaaa ] : e:/indexer3/b10181
Query: ['b10181_p388'] in Folder e:/indexer3/b10181/b10181_indx_

Found document(s) that matched : 'b10181_p388' no of hits :'1' in query
Field :'filename'
File Name     : B10181_P388


3)On Search for range between 2 file names  B10181_P702   to  B01081_P355
    still returns me  0 hits  [Included space before the 2nd '+' ]

D:\JAVA\lucene\src\demo>java org.lucene.src.indexer.search.SearchFiles
Search Keyword : +button +filename:[b10181_p702 TO b10181_p355]
Source path [ E:/po/aaaa ] : e:/indexer3/b10181
Query: ['+button +filename:[b10181_p702 TO b10181_p355]'] in Folder
e:/indexer3/b10181/b10181_indx_
Not a Found document(s) that matched query Field 'filename':

				or

D:\JAVA\lucene\src\demo>java com.controlnet.indexing.search.SearchFiles
Search Keyword : +contents:button +filename:[b10181_p702 TO b10181_p355]
Source path [ E:/po/aaaa ] : e:/indexer3/b10181
Query: ['+contents:button +filename:[b10181_p702 TO b10181_p355]'] in Folder
e:/indexer3/b10181/b10181_indx_
Not a Found document(s) that matched query Field 'filename':


Also the does the search varies on the Field Type if so My Indexed Field
types as below....

doc.add(Field.Text("path", fhtml.getPath()));
doc.add(Field.Keyword("modified",fhtml.lastModified()+""));
doc.add(Field.Text("filename",fhtml.getName()));
doc.add(Field.Keyword("creation",CREATION_));
doc.add(Field.Keyword("bookid",BOOKID_));
doc.add(Field.Text("chapNme",CHAPNAME_));
doc.add(Field.Text("itmName",ITEMNAME_));



please do advise me.
Karthik



[ James Goslink says   Microsoft has More Money to burn then GOD has
  ...on his visit to India,In an interview to MSNBC TV Last night ]



-----Original Message-----
From: Ype Kingma [mailto:ykingma@xs4all.nl]
Sent: Monday, May 31, 2004 2:52 PM
To: lucene-user@jakarta.apache.org
Subject: Re: Range Query Sombody HELP please


On Monday 31 May 2004 11:09, Karthik N S wrote:

...
> I re indexed my folder 10181 [Seem's to be corrupted]

Was the index writer closed?

> Now I am getting the hits as....
>
>
> D:\JAVA\lucene\src\demo>java org.lucene.src.indexer.search.SearchFiles
> Search Keyword : +button+filename:[B10181_P702 TO B01081_P355]

The query needs to have space before the 2nd + :

+button  +filename:[B10181_P702 TO B01081_P355]

> Source path [ E:/po/aaaa ] : e:/indexer3/b10181
> Query: ['+button+filename:[B10181_P702 TO B01081_P355]'] in Folder
> e:/indexer3/b10181/b10181_indx_
> Not a Found document(s) that matched query Field 'filename':
> Not a Found document(s) that matched query Field 'bookid':
> Not a Found document(s) that matched query Field 'creation':
> Not a Found document(s) that matched query Field 'contents':
> Not a Found document(s) that matched query Field 'chapNme':
> Not a Found document(s) that matched query Field 'itmName':

You seem to use a search mechanism that searches all these fields.
I'd recommend to switch this off until a query with explicit fields works,
eg.:

+contents:button  +filename:[B10181_P702 TO B01081_P355]

Btw. You'll need to make sure that a term like B10181_P702 is
not split at the underscore _ by a tokenizer at indexing time.
If your filename is not a keyword field, you might consider
changing it into a keyword field.

You seem to index book pages as Lucene documents, which is ok.
However, you may also need to index larger parts of the books in
order to retrieve books with multiple subjects on different pages.
Is this what your original question is about?

Have fun,
Ype


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message