You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Tommaso Teofili (JIRA)" <ji...@apache.org> on 2015/11/20 11:57:11 UTC

[jira] [Comment Edited] (OAK-3149) SuggestHelper should manage a suggestor per index definition

    [ https://issues.apache.org/jira/browse/OAK-3149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15015593#comment-15015593 ] 

Tommaso Teofili edited comment on OAK-3149 at 11/20/15 10:56 AM:
-----------------------------------------------------------------

after playing around with this a bit it seems to me the only reliable way to have indexes use their own suggester is to use a side index to store suggestions using the same mechanism we use for indexing and searching across nodes and properties. This means we'll have a node (e.g. _/oak:index/lucene/:suggest-data_) holding the suggest index which will be updated (in {{LuceneIndexEditorContext}}), while it'll be possible to retrieve a {{Lookup}} instance (e.g. {{BlendingInfixSuggester}} from an {{IndexNode}} to be used at search time.

And by the way I think spellcheck has this same issue, so we may want to use a sidecar index for spellchecking too.


was (Author: teofili):
after playing around with this a bit it seems to me the only reliable way to have indexes use their own suggester is to use a side index to store suggestions using the same mechanism we use for indexing and searching across nodes and properties. This means we'll have a node (e.g. _/oak:index/lucene/:suggest-data_) holding the suggest index which will be updated (in {{LuceneIndexEditorContext}}), while it'll be possible to retrieve a {{Lookup}} instance (e.g. {{BlendingInfixSuggester}} from an {{IndexNode}} to be used at search time.

> SuggestHelper should manage a suggestor per index definition
> ------------------------------------------------------------
>
>                 Key: OAK-3149
>                 URL: https://issues.apache.org/jira/browse/OAK-3149
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: lucene
>            Reporter: Chetan Mehrotra
>            Assignee: Tommaso Teofili
>             Fix For: 1.3.11
>
>
> {{SuggestHelper}} currently keeps a static reference to suggestor and thus have a singleton suggestor for whole repo. Instead it should be implemented in such a way that a suggestor instance is associated with index definition. 
> Logically the suggestor instance should be part of IndexNode similar to how {{IndexSearcher}} instances are managed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)