-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Wild card search problem
PostPosted: Mon Mar 30, 2009 8:49 am 
Beginner
Beginner

Joined: Tue Feb 03, 2009 12:29 pm
Posts: 49
In my entity, I have a field indexed as untokenized as shown.
Code:

   @Field(name = "model.untok", index = Index.UN_TOKENIZED)
   @Column(name = "MODEL")
   private String model;


When I use a wild card search for it, I don't get any results. But normal query and proximity query are working fine.

I have the value "PQR" in some of the records, but "PQ*" doesn't match any.

Code:

QueryParser parser1 = new QueryParser("model.untok", new KeywordAnalyzer());

Query query = parser1.parse("PQR" ); // Works fine

Query query = parser1.parse("PQ~" );  // Works fine

Query query = parser1.parse("PQ*" ); // No records found


Please advise.

Thanks,
Seema


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 31, 2009 4:48 am 
Pro
Pro

Joined: Wed Oct 03, 2007 2:31 pm
Posts: 205
Hi can you try the following:

Query parser = new AnalyzingQueryParser("model.untok", new KeywordAnalyzer())

Cheers
Amin


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.