Hi, James,

If you don't store or index this value, it won't exist in Solr.

If you want to be able to find these records by the unique id, you
need to index it. If you want to find the corresponding DB record from
a Solr document you brought up by other means, you'll need to store
the unique id.

Michael Della Bitta

------------------------------------------------
Appinions | 18 East 41st St., Suite 1806 | New York, NY 10017
www.appinions.com
Where Influence Isn’t a Game


On Thu, Sep 20, 2012 at 8:38 AM, Spadez <james_will...@hotmail.com> wrote:
> Hi.
>
> My SQL database assigns a uniqueID to each item. I want to keep this
> uniqueID assosiated to the items that are in Solr even though I wont ever
> need to display them or have them searchable. I do however what to be able
> to target specific items in Solr with it, for updating or deleting the
> record.
>
> Right now I have this in my schema:
> <field name="id" type="string" indexed="true" stored="true"/>
>
> However, since I dont want it searchable or stored it should be this:
> <field name="uniqueid" type="string" indexed="false" stored="false"/>
>
> Firstly, is this the correct way of doing this? I saw mention of a "ignore"
> attibute that can be added.
>
> Secondly, if I wanted to do updates to the fields using JSON by targetting
> the uniqueID can I still do something like this:
> "delete": { "uniqueid":"7" },                               /* delete entry
> uniqueID=7 */
>
> Thank you for any help you can give. Hope I explained it well enough.
>
> James
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/ID-reference-field-Needed-but-not-searchable-or-retrievable-tp4009162.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to