You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by di...@student.bth.se on 2003/07/14 14:11:35 UTC

Field.Text(string, string) and Queryparser

Hello

When I use QueryParser.parse(String query,String field,Analyzer analyzer) and 
have added the field with the type Field.Text(string, string), I can't search 
in specific field like

component:call
                   
It can't find the word call in the field component.
But if I instead use Field.Text(string, Reader) the query works.


Another problem is that I have to use Field.Text(string, string) if I want to 
know if the hits contain field with the name component. Then I use this code:

Vector component = new Vector();
if(doc.getField("component")!=null){
	component.addElement(doc);
				}
To use getField(string) I have to use Field.Text(string, string) 

When I display the hits I want to divide them in catagory according to the 
field name. If I have field called component, interface and datatypes I want to 
display the hits like:

component
hit1
hit2
hit3

interface
hit4

data type
hit5

But I also want to search in a specific field at the samt time.

Help me, please.

I hope that I have explained my problem so you can understand it.

Thanks
/Michelle











-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

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