Re: Accessing the "contents" field

2002-03-13 Thread Peter Carlson
Hi, Your adding the Field.Text(String, Reader) which does not store the field contents. See API docs. Either use doc.add(Field.Text(String,String)) or doc.add(new Field(String, String true, true, true)) To store, index and tokenize Hope this helps --Peter On 3/13/02 10:54 PM, "ROSHAN NAVEN

RE: Accessing the "contents" field

2002-03-13 Thread Sreenivasulu M
Hi Roshan, Here is the solution. > doc.add(Field.Text("body", (Reader) new InputStreamReader(is))); while adding the fields to the document...there is another overloaded function which takes string instead of Reader. Which actually stores the contents in document. First read the

Re: Accessing the "contents" field

2002-03-13 Thread ROSHAN NAVENDRA
Sunnetha, this is my Search code... I have tried the get("body") call but it returns a Null. thus i cannot actually process document contents.. I need to do this to extract data such as document titles etc currently it uses get("path") to get the documents path but if I were to change

Re: Accessing the "contents" field

2002-03-13 Thread suneethad
Hi Roshan, U've got to get the contents as doc(i).get("body") The field name has to match what is queried back . Suneetha. NAVENDRA wrote: > It is being added as a Text field which is stored i gather. Is is also being >added as as a Reader..

Re: Accessing the "contents" field

2002-03-13 Thread ROSHAN NAVENDRA
It is being added as a Text field which is stored i gather. Is is also being added as as a Reader this might be the problem I am not sure. Here is my code, can anybody please help me. import org.apache.lucene.analysis.SimpleAnalyzer; import org.apache.lucene.index.IndexWriter; import or

Re: Accessing the "contents" field

2002-03-13 Thread Otis Gospodnetic
Make sure that you added it to the index as a stored field, and not just indexed. Look at the Javadoc for Field class to see different field types. Otis --- ROSHAN NAVENDRA <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to access the contents field of a document, fo rexample > > doc(i).get

Chinese charactor support

2002-03-13 Thread GeKai.Zou
Hi, Can lucene support Chinese charactor search by default? or Is there any solution for that available now? Thx. BR, ZGK -- To unsubscribe, e-mail: For additional commands, e-mail:

Accessing the "contents" field

2002-03-13 Thread ROSHAN NAVENDRA
Hi, I would like to access the contents field of a document, fo rexample doc(i).get("contents") this should return a String (am i right?) but when I print it out I find that it is a Null. How do I go about accessing the contents of the file Rosh. -- To unsubscribe, e-mail:

Re: search for words separated by spaces

2002-03-13 Thread ROSHAN NAVENDRA
that is an OR >>> [EMAIL PROTECTED] 03/14/02 02:49AM >>> Hello All, Phrase queries work fine for some thing like "I am a programmer". But if I don't use quotes and look for just I am a programmer what is the result set returning? Is it AND of all words or OR? or is it just picking up the firs wor

Re: search for words separated by spaces

2002-03-13 Thread Winton Davies
Its doing a disjunctive (OR) search, but the prescence of all the tokens is more important than fewer, so it may look like a conjunctive search to you. Winton >Hello All, >Phrase queries work fine for some thing like "I am a programmer". But if I >don't use quotes and look for just >I am a p

search for words separated by spaces

2002-03-13 Thread Aruna Raghavan
Hello All, Phrase queries work fine for some thing like "I am a programmer". But if I don't use quotes and look for just I am a programmer what is the result set returning? Is it AND of all words or OR? or is it just picking up the firs word "I" and searching for it? Thanks again! Aruna. -- To un

Phone number Searches

2002-03-13 Thread Aruna Raghavan
Hello All, I tried doing a search for a phone number 1-954-612-1276. It worked fine. I am using a StandardAnalyzer for both indexing and searching. From looking at StandardTokenizer.jj and StandardAnalyzer, "-" is a valid character. So, how is this differentiated from "-" that we use for exclusion

Re: Bad File Descriptor Exception

2002-03-13 Thread Avi Drissman
At 6:21 PM +0530 3/13/02, you wrote: >Hits hits = searcher.search(query); //returns hits properly >for (int i =0; i< hits.length();i++) >{ > Document doc = hits.doc(i); // throws exception "Bad Fle Descriptor" >} Are you closing the searcher between the search and the loop? Hits objects don

Bad File Descriptor Exception

2002-03-13 Thread Jayakumar P
Hi all, I'm a new user to Lucene, I'm getting "Bad File Descriptor" Exception for the following piece of code Hits hits = searcher.search(query); //returns hits properly for (int i =0; i< hits.length();i++) { Document doc = hits.doc(i); // throws exception "Bad Fle Descriptor" } can any one