lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chad Small" <>
Subject RE: Query syntax on Keyword field question
Date Tue, 23 Mar 2004 17:58:36 GMT
I have since learned that using the TermQuery instead of the MultiFieldQueryParser works for
the keyword field in question below (HW-NCI_TOPICS).
apiQuery = new BooleanQuery();
apiQuery.add(new TermQuery(new Term("category", "HW-NCI_TOPICS")), true, false);
This finds a match.
I found a message that talked about having to use the the Query API when searching Keyword
fields in the index.  Is this true?
Is there not a way to get the MultiFieldQueryParser to find a match on this keyword?

	-----Original Message----- 
	From: Chad Small 
	Sent: Tue 3/23/2004 10:57 AM 
	Subject: Query syntax on Keyword field question

	How can I format a query to get a hit?
	I'm using the StandardAnalyzer() at both index and search time.
	If I'm indexing a field like this:
	I've tried the following with no success:
	//      String searchArgs = "HW\\-NCI_TOPICS";
	//      String searchArgs = "HW\\-NCI_TOPICS".toLowerCase();
	//      String searchArgs = "+HW+NCI+TOPICS";
	      //this works with .Text field
	//      String searchArgs = "+hw+nci+topics";
	//      String searchArgs = "hw nci topics";

View raw message