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

Alan Woodward commented on LUCENE-7394:
---------------------------------------

We'd still need a way to set a Similarity so that we can encode norms, I think?

The tricky part here is going to be untangling the various shared block pools.  
We need to make sure that calling .addField() doesn't change the data 
referenced by a previously created IndexReader, which is where I got stuck last 
time I tried playing around with this idea.

Another nice cleanup would be to remove the global storeOffsets and 
storePayloads settings and instead set them per-field.

> Make MemoryIndex immutable
> --------------------------
>
>                 Key: LUCENE-7394
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7394
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Martijn van Groningen
>
> The MemoryIndex itself should just be a builder that constructs an 
> IndexReader instance. The whole notion of freezing a memory index should be 
> removed.
> While we change this we should also clean this class up. There are many 
> methods to add a field, we should just have a single method that accepts a 
> `IndexableField`.
> The `keywordTokenStream(...)` method is unused and untested and should be 
> removed and it doesn't belong with the memory index.
> The `setSimilarity(...)`, `createSearcher(...)` and `search(...)` methods 
> should be removed, because the MemoryIndex should just be responsible for 
> creating an IndexReader instance.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to