-->
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: Searching a single document (entity)
PostPosted: Thu Mar 22, 2012 7:05 am 
Newbie

Joined: Wed Mar 07, 2012 12:21 pm
Posts: 6
Location: Zürich
I try to implement a mechanism, which gets the found terms for a query from a single document (or indexed entity).

So far, I can get terms for all found documents using Lucene's highlighter package in conjunction with a custom Formatter. However, for performance reasons I would like to get the terms for a single document (based on the entity id).

How do I restrict the (FullText) query to match a single document in the index? A custom filter?


Top
 Profile  
 
 Post subject: Re: Searching a single document (entity)
PostPosted: Fri Mar 23, 2012 5:46 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Rico Leuthold wrote:
How do I restrict the (FullText) query to match a single document in the index? A custom filter?


A filter is one way or you incorporate the entity id into the search. The id is always indexed as well. The field name is _ProjectionConstants.ID_

--Hardy


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.