Re: Solr search not working after copying a new field to an existing Indexed Field
This should not be the case. Any time you add a document with a pre-existing unkqueKey, the old document is completely replaced by the new document. You do have to issue a commit before you'll see the new info though. And if you do not have a uniqueKey defined, you'll see two copies of the doc. And sometimes your browser cache will fool you... Best Erick On Tue, Sep 11, 2012 at 8:21 PM, Mani mehamba...@art.com wrote: Eric, When you add a doc with the same unique key as an old doc, the data associated with the first version of the doc is entirely thrown away and its as though you'd never indexed it at all, I did exactly the same. The old doc and new doc there is not a change except the Name has changed. When I query Solr for the document, I do see the Name field with the correct recent changes. However if I search for for the new name, I do not get the result. So I removed all the documents entirely and then added the same new document. It worked. Not sure if this is a bug. So whenever I add a new field to an existing search field, the document needs to be thrown away (not just adding with the same key as its not working in my case) for the search to take effect. Thanks -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-search-not-working-after-copying-a-new-field-to-an-existing-Indexed-Field-tp4005993p4007096.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr search not working after copying a new field to an existing Indexed Field
Eric, When you add a doc with the same unique key as an old doc, the data associated with the first version of the doc is entirely thrown away and its as though you'd never indexed it at all, I did exactly the same. The old doc and new doc there is not a change except the Name has changed. When I query Solr for the document, I do see the Name field with the correct recent changes. However if I search for for the new name, I do not get the result. So I removed all the documents entirely and then added the same new document. It worked. Not sure if this is a bug. So whenever I add a new field to an existing search field, the document needs to be thrown away (not just adding with the same key as its not working in my case) for the search to take effect. Thanks -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-search-not-working-after-copying-a-new-field-to-an-existing-Indexed-Field-tp4005993p4007096.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr search not working after copying a new field to an existing Indexed Field
Solr docs a complete delete and re-add, there's no way to do a partial update. When you add a doc with the same unique key as an old doc, the data associated with the first version of the doc is entirely thrown away and its as though you'd never indexed it at all, the second version completely replaces it. Does that help? Best Erick On Fri, Sep 7, 2012 at 12:54 PM, Mani mehamba...@art.com wrote: yes..I do have this uniquekey defined properly. uniqueKeyid/uniqueKey Before the schema change... copyField source=itemSKU dest=text/ copyField source=itemCategories dest=text/ After the schema change... copyField source=itemName dest=text/ copyField source=itemCategories dest=text/ copyField source=itemSKU dest=text/ -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-search-not-working-after-copying-a-new-field-to-an-existing-Indexed-Field-tp4005993p4006217.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr search not working after copying a new field to an existing Indexed Field
Do you have the unique key set up in your schema.xml ? It should be automatic if you have the ID field and define it as the unique key. uniqueKeyID/uniqueKey On Thu, Sep 6, 2012 at 11:50 AM, Mani mehamba...@art.com wrote: I have a made a schema change to copy an existing field name (Source Field) to an existing search field text (Destination Field). Since I made the schema change, I updated all the documents thinking the new source field will be clubbed together with the text field. The search for a specific name does not return results. If I delete the document and then adding the document back works just fine. I thought Add command with default override option will work as Delete and Add. Is this the only way to reindex the text field? Is there anyother method? I really appreciate your help on this! -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-search-not-working-after-copying-a-new-field-to-an-existing-Indexed-Field-tp4005993.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr search not working after copying a new field to an existing Indexed Field
yes..I do have this uniquekey defined properly. uniqueKeyid/uniqueKey Before the schema change... copyField source=itemSKU dest=text/ copyField source=itemCategories dest=text/ After the schema change... copyField source=itemName dest=text/ copyField source=itemCategories dest=text/ copyField source=itemSKU dest=text/ -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-search-not-working-after-copying-a-new-field-to-an-existing-Indexed-Field-tp4005993p4006217.html Sent from the Solr - User mailing list archive at Nabble.com.
Solr search not working after copying a new field to an existing Indexed Field
I have a made a schema change to copy an existing field name (Source Field) to an existing search field text (Destination Field). Since I made the schema change, I updated all the documents thinking the new source field will be clubbed together with the text field. The search for a specific name does not return results. If I delete the document and then adding the document back works just fine. I thought Add command with default override option will work as Delete and Add. Is this the only way to reindex the text field? Is there anyother method? I really appreciate your help on this! -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-search-not-working-after-copying-a-new-field-to-an-existing-Indexed-Field-tp4005993.html Sent from the Solr - User mailing list archive at Nabble.com.