[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-263) Wrong analyzers used in IndexWriter

Emmanuel Bernard (JIRA) noreply at atlassian.com
Sat Sep 13 17:41:04 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31178#action_31178 ] 

Emmanuel Bernard commented on HSEARCH-263:
------------------------------------------

I prefer the latter
same file names between various entity tipes is quite common so conflicts will happen.

Alternatively we can use a wrapper analyzer that can switch from one underlying analyzer to another depending on some inputs from the code.
Right before adding a document, switch to the right analyzer. It should work.



> Wrong analyzers used in IndexWriter
> -----------------------------------
>
>                 Key: HSEARCH-263
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-263
>             Project: Hibernate Search
>          Issue Type: Bug
>          Components: analyzer
>    Affects Versions: 3.1.0.Beta1
>            Reporter: Sanne Grinovero
>            Priority: Critical
>
> when an IndexWriter is first opened during a transaction commit it is assigned the analyzer connected to the first entity written,
> if during the same transaction other entities are saved to the same index it will reuse the first one ( instead of the entity specified one).
> I have a testcase showing the problem ready for commit but need your opinion about how to solve it.
> I think the problem is that we register a ScopedAnalyzer for each DocumentBuilder, but there should be one per DirectoryProvider?
> In this case we should check at startup that no entities sharing an index define conflicting Analyzer rules.
> Another solution would be to let complete flexibility during analyzer definition, but reopen the IndexWriter when the entityType is different
> from the last one indexed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list