Results 1 to 1 of 1
Thread: Space character in fieldname
- 11-24-2010, 10:48 AM #1
Member
- Join Date
- Nov 2010
- Posts
- 1
- Rep Power
- 0
Space character in fieldname
Hi,
searched this one, but didn't find satisfying results, here my problem:
my project requiers the fieldname to support space characters, but as a matter of fact the query results wrong after parsing. following my example:
this results in the following output:Java Code:String searchTerm = "+machine supplier:(dell OR medion) AND +HD:(200 OR 500)"; QueryParser parser = new QueryParser(Version.LUCENE_30, "ID", new KeywordAnalyzer()); Query q = parser.parse(searchTerm); System.out.println("query : " + q);
the parser takes the first part of the fieldname "machine supplier" and puts the default field "ID" infront of it.Java Code:query : +ID:machine +(supplier:dell supplier:medion) +(HD:200 HD:500)
Is there a way to let the parser know, that the fieldname is the whole term "machine supplier" ?
Am I doing anything else wrong?
thanks shane
Similar Threads
-
Space Invaders help!
By Midge in forum New To JavaReplies: 5Last Post: 03-04-2010, 04:38 PM -
SWT Canvas drawing realtive to image space not canvas space.
By bobbie in forum SWT / JFaceReplies: 0Last Post: 07-05-2009, 12:31 PM -
Read from a certain character to a certain character
By blackstormattack in forum New To JavaReplies: 0Last Post: 03-16-2009, 11:36 AM -
Space Exploration dev 6
By JavaBean in forum Java SoftwareReplies: 0Last Post: 03-25-2008, 04:48 PM -
reading text character by character
By bugger in forum New To JavaReplies: 2Last Post: 11-09-2007, 08:54 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks