-->
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: Search from database?
PostPosted: Tue Feb 23, 2010 11:02 pm 
Newbie

Joined: Tue Feb 23, 2010 10:46 pm
Posts: 17
Hi,

I was doing some testing on Hibernate Search. I created some records through the system and they are successfully indexed. I expect to do a manual re-indexing after I ve modified the database manually that the change are not captured through the system..

However, after I ve made changes directly to the database, my search results reflects the newly updated records. Thus, can i say that Hibernate Search search the database instead of the indexed files? Can i enforce the Hibernate Search to search the indexed files only?

All columns in my entity are indexed and referenced the following example for search:

org.apache.lucene.queryParser.QueryParser parser = new QueryParser("title", new SimpleAnalyzer());
org.apache.lucene.search.Query luceneQuery = parser.parse( "title:sky Or title_stemmed:diamond" );
org.hibernate.Query fullTextQuery = fullTextSession.createFullTextQuery( luceneQuery, Song.class );
List result = fullTextQuery.list(); //return a list of managed objects


Top
 Profile  
 
 Post subject: Re: Search from database?
PostPosted: Tue May 18, 2010 4:59 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
I'm sorry for the late answer, we from the Search team don't notice all posts on the wrong forum. Hibernate Search related questions should be posted on the Search forum.

Hibernate Search uses the indexes to perform your search, but by default loads data from the DB and shows only up-to-date data from still-existing hits, so it's using both index and DB, but on DB the performed query is very simple and efficient.

_________________
Sanne
http://in.relation.to/


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.