You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2007/10/03 04:49:50 UTC

[jira] Commented: (SOLR-351) external value source

    [ https://issues.apache.org/jira/browse/SOLR-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531988 ] 

Yonik Seeley commented on SOLR-351:
-----------------------------------

OK, the latest SOLR-344 patch includes external value source.

Here is what the fieldType in the schema looks like:
    <fieldType name="file" class="solr.ExternalFileField" keyField="id" defVal="1" stored="false" indexed="false"  valType="float"/>

* keyField will normally be the unique key field, but it doesn't have to be.
** it's OK to have a keyField value that can't be found in the index
** it's OK to have some documents without a keyField in the file (defVal is used as the default)
** it's OK for a keyField value to point to multiple documents (no uniqueness requirement)
* valType is a reference to another fieldType to define the value type of this field (must currently be FloatField (float))

The format of the external file is simply
keyFieldValue=floatValue
keyFieldValue=floatValue

Solr looks for the external file in the index directory under the name of
external_<filename>  or  external_<filename>.*

If any files of the latter pattern appear, the last (after being sorted by name) will be used and previous versions will be deleted.  This is to help support systems where one may not be able to overwrite a file (like Windows, if the file is in use).

If the external file has already been loaded, and it is changed, those changes will not be visible until a commit has been done.

The external file may be sorted or unsorted by the key field, but it will be substantially slower (untested) if it isn't sorted.


> external value source
> ---------------------
>
>                 Key: SOLR-351
>                 URL: https://issues.apache.org/jira/browse/SOLR-351
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Yonik Seeley
>
> Need a way to rapidly do a bulk update of a single field for use as a component in a function query (no need to be able to search on it).
> Idea: create an ExternalValueSource fieldType that reads it's values from a file.  The file could be simple id,val records, and stored in the index directory so it would get replicated.  
> Values could optionally be updated more often than the searcher (hashCode/equals should take this into account to prevent caching issues).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.