You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Игорь Абрашин <vj...@gmail.com> on 2017/10/13 09:57:16 UTC
Appending fields to pre-existed document
Hello, solr community.
We are getting strugled with updating already existing docs. For instance,
we got indexed one jpg with tika parser and got batch of attributes. Then
we want to index database datasource and append those fields to our
document with the same uniquekey, stored at schema.xml. And all what we got
only a overwriting doc came first by new one. Ok just put overwrite=false
to params, and dublicating docs appeare. So do you have some clues or
suggesstions related to that. How to append one batch of attribute to
another? Or maybe how to merge them after duplicate was created?
Re: Appending fields to pre-existed document
Posted by Игорь Абрашин <vj...@gmail.com>.
Hi,
Yeah, sure but what exactly should i utilize?
Because as i see all of them require to use set or add in json..how can i
perform that from dataimport or posting file from curl? Also we've tried to
use version feature to combine both sources, but nothing at all
13 окт. 2017 г. 17:49 пользователь "alessandro.benedetti" <
a.benedetti@sease.io> написал:
Hi,
"And all what we got
only a overwriting doc came first by new one. Ok just put overwrite=false
to params, and dublicating docs appeare."
What is exactly the doc you get ?
Are the fields originally in the first doc before the atomic update stored ?
This is what you need to use :
https://lucene.apache.org/solr/guide/6_6/updating-parts-of-documents.html
If you don't, Solr by default will just overwrite the entire document.
-----
---------------
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Appending fields to pre-existed document
Posted by "alessandro.benedetti" <a....@sease.io>.
Hi,
"And all what we got
only a overwriting doc came first by new one. Ok just put overwrite=false
to params, and dublicating docs appeare."
What is exactly the doc you get ?
Are the fields originally in the first doc before the atomic update stored ?
This is what you need to use :
https://lucene.apache.org/solr/guide/6_6/updating-parts-of-documents.html
If you don't, Solr by default will just overwrite the entire document.
-----
---------------
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Appending fields to pre-existed document
Posted by Игорь Абрашин <vj...@gmail.com>.
Hi, Rich.
Here what've got:
Solr version 7.0.0
Fields definitions in schema.xml for dataimport datasource (our database)
<field name='comment_db' type=string indexed=true stored=true/>
And batch of edentical fields
<field name='url_path' type=string indexed=true stored=true required=true/>
<uniquekey>url_path</uniquekey>
Fields definitions in schema.xml for updateExtract hadler
<field name='attr_content' type=string indexed=true stored=true/>
And other field wich is not important in our case.
So our goal to combine attributes comes from database and extracted content
comes from files.
/dataimport handler is totally as default.
/update/extract the same situation..get it from solr in box build.
Data-config.xml pretty simple. Do not have any deviation from examples
We using curl to post file and extract content from stream. For data
import we was trying full-import and delta-import no success for both.
13 окт. 2017 г. 15:56 пользователь "Rick Leir" <rl...@leirtech.com> написал:
> Hi
> Show us the solr version, field types, the handler definition, and the
> query you send. Any log entries?
> Cheers -- Rick
>
> On October 13, 2017 5:57:16 AM EDT, "Игорь Абрашин" <vj...@gmail.com>
> wrote:
> >Hello, solr community.
> >We are getting strugled with updating already existing docs. For
> >instance,
> >we got indexed one jpg with tika parser and got batch of attributes.
> >Then
> >we want to index database datasource and append those fields to our
> >document with the same uniquekey, stored at schema.xml. And all what we
> >got
> >only a overwriting doc came first by new one. Ok just put
> >overwrite=false
> >to params, and dublicating docs appeare. So do you have some clues or
> >suggesstions related to that. How to append one batch of attribute to
> >another? Or maybe how to merge them after duplicate was created?
>
> --
> Sorry for being brief. Alternate email is rickleir at yahoo dot com
Re: Appending fields to pre-existed document
Posted by Rick Leir <rl...@leirtech.com>.
Hi
Show us the solr version, field types, the handler definition, and the query you send. Any log entries?
Cheers -- Rick
On October 13, 2017 5:57:16 AM EDT, "Игорь Абрашин" <vj...@gmail.com> wrote:
>Hello, solr community.
>We are getting strugled with updating already existing docs. For
>instance,
>we got indexed one jpg with tika parser and got batch of attributes.
>Then
>we want to index database datasource and append those fields to our
>document with the same uniquekey, stored at schema.xml. And all what we
>got
>only a overwriting doc came first by new one. Ok just put
>overwrite=false
>to params, and dublicating docs appeare. So do you have some clues or
>suggesstions related to that. How to append one batch of attribute to
>another? Or maybe how to merge them after duplicate was created?
--
Sorry for being brief. Alternate email is rickleir at yahoo dot com