Ability to add to/remove from index based on object state
Description
Activity

Hardy FerentschikJuly 31, 2008 at 12:58 PM
Better solved by filters.

Stefan NorbergMay 23, 2007 at 7:36 AM
Yeah I think you are right. I checked the Lucene docs for QueryFilter and it does the job nicely. I guess one could still consider a tag like "@AddToIndexWhen" or similar to limit short lived objects to enter the index to avoid getting pre-search lifecycle objects into the index. Thanks for the awesome work with this project (and others).
Emmanuel BernardMay 23, 2007 at 5:47 AM
While your idea of using an EL to restrict indexing is seducing it actually pose an issue when deleting which limits the feature usefulness
I think this problem is more elegantly solved with a support for

Stefan NorbergMay 23, 2007 at 1:59 AM
No it isn't, and it's probably a good way to solve it if you think so. The reason not to add it would only be to avoid cludgy code to exclude some documents in the search. Perhaps its not worth it. You decide. I have no hands-on experience with Hibernate Search yet, only your JavaOne talk really. I have used some Lucene, but I liked the simplicity of the HS annotations.
Emmanuel BernardMay 23, 2007 at 1:37 AM
But why don't you just use a query (or a queryFilter) for such restriction. It really seems to me that such a use case is better handled that way.
Is the indexing that much of an overhead?
Details
Assignee
UnassignedUnassignedReporter
Stefan NorbergStefan NorbergPriority
Major
Details
Details
Assignee
Reporter

As we discussed after your session on JavaOne, I'd like to see a feature that adds an object to the index based on a expression.
Example: An object travels through a state machine and gets past the "approved" state and should now be indexed for search. Later the object gets "unapproved" and should be removed from the search index.
It would be nice to have a condition on a combination of bean properties if the object should be in the index.