You can set default values in the UpdateRequestProcessor chain:
http://www.solr-start.com/javadoc/solr-lucene/org/apache/solr/update/processor/DefaultValueUpdateProcessorFactory.html

You can combine URPs with DIH. There is an example for that in the latest Solr:
https://github.com/apache/lucene-solr/blob/releases/lucene-solr/6.6.0/solr/example/example-DIH/solr/atom/conf/solrconfig.xml

Regards,
   Alex.
----
http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 4 July 2017 at 11:15, txlap786 <tx...@hotmail.com> wrote:
> Hello everyone o/. Im trying to index a xml file using DIH.
>
> Its mostly like this.
>
> ---- EXAMPLE DIH CONFIG STRUCTURE----
> <entity processor="FileListEntityProcessor" ..
>         <entity processor="XPathEntityProcessor" ..
> forEach="/entryHeader"
>                 <field column=.. xpath=.. />
>                 <field column=.. xpath=.. />
>                 <field column=.. xpath=.. />
>         </entity>
> </entity>
>
> ---- EXAMPLE XML STRUCTURE ----
> <gl-cor:entryHeader>
>         <gl-cor:entryNumberCounter> xx </gl-cor:entryNumberCounter>
>         <gl-cor:entryNumber> xx </gl-cor:entryNumber>
>         <gl-cor:entryDetail>
>                 <gl-cor:lineNumber> xx </gl-cor:lineNumber>
>                 <gl-cor:detailComment> xx </gl-cor:detailComment>
>         </gl-cor:entryDetail>
>         <gl-cor:entryDetail>
>                 <gl-cor:lineNumber> xx </gl-cor:lineNumber>
>                 <gl-cor:detailComment> xx </gl-cor:detailComment>
>         </gl-cor:entryDetail>
>         <gl-cor:entryDetail>
>                 <gl-cor:lineNumber> xx </gl-cor:lineNumber>
>                 <gl-cor:detailComment> xx </gl-cor:detailComment>
>         </gl-cor:entryDetail>
> </gl-cor:entryHeader>
> <gl-cor:entryHeader>
>         <gl-cor:entryNumberCounter> xx </gl-cor:entryNumberCounter>
>         <gl-cor:entryNumber> xx </gl-cor:entryNumber>
>         <gl-cor:entryDetail>
>                 <gl-cor:lineNumber> xx </gl-cor:lineNumber>
>                 <gl-cor:detailComment> xx </gl-cor:detailComment>
>         </gl-cor:entryDetail>
> </gl-cor:entryHeader>
> <gl-cor:entryHeader>
>         <gl-cor:entryNumberCounter> xx </gl-cor:entryNumberCounter>
>         <gl-cor:entryNumber> xx </gl-cor:entryNumber>
>         <gl-cor:entryDetail>
>                 <gl-cor:lineNumber> xx </gl-cor:lineNumber>
>         </gl-cor:entryDetail>
>         <gl-cor:entryDetail>
>                 <gl-cor:lineNumber> xx </gl-cor:lineNumber>
>         </gl-cor:entryDetail>
> </gl-cor:entryHeader>
>
> (at  detailComment doesnt exist) !!
>
> ---- JSON return ----
>
> "detailComment",
> [
> "100.01",
> "102.01",
> "102.02",
> "120.01",
> "120.02",
> "153.01",
> "320.01",
> null,
> null
> ]
>
> ---- INDEXED ----
>
> "detailComment" : [
> "100.01",
> "102.01",
> "102.02",
> "120.01",
> "120.02",
> "153.01",
> "320.01"
> ]
>
>
> so,
> <field name="detailComment" ... multiValued="true" default="somethingelse"/>
> default doesnt work due to multivalued
>
> How can i index those null as something visible. like "0","null","NULL" or
> "empty"
>
> I want the indexed ones to be same as json return..
>
> Can i use xPathprocessor inside of xPathprocessor to get those "entryDetail"
> ?
> So i wont have to use multivalues anymore. just gonna set default values for
> each
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/xml-indexing-tp4344191.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to