lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Collins <danwcoll...@gmail.com>
Subject Re: CopyField can't copy analyzers and Filters
Date Tue, 01 Jul 2014 15:12:42 GMT
Ok, firstly to say you need to fix your problem but you can't modify the
schema, doesn't really help.  If the schema is setup badly, then no amount
of help at search time will ever get you the results you want...

Secondly, from what I can see in the schema, there is no AllChamp_fr,
AllChamp_en, etc?  There is only AllChamp, which you create by copying from
other places.  And that in itself seems odd to me, you are copying Cx_id
(which are longs) and Cx_val (which are text) into a single text_general
field, so lord knows what that's going to index like (really inefficiently
I would guess), and it won't be very accurate on the number values if you
ever want to do anything like range queries on those...

Back to Erick's response, take a step back and try to explain what the real
problem is, what fields you index, and what you want to achieve.

We have a similar situation with Languages, we have 3 fields per document
that are language specific, so we index them into language-specific fields.
 We then copyField them into a text_general (as well) so we have a
generically stemmed version if we want to do a more general query.  If we
need to explicitly search accurately for language-specific terms, then we
need to OR all the language fields.  That has a cost in creating the query,
but it is more efficient.



On 1 July 2014 16:04, benjelloun <anass.bnj@gmail.com> wrote:

> hello erick,
>
> unfortunately i can't modify the schema , me and my team analyzed carefully
> the problem,
> so all fields you seeing are required on schema.
>
> now i just tested to do different fields maybe it could work if i knew
> syntaxe of edismax:
> <field name="AllChamp_ar" type="text_ar" multiValued="true" indexed="true"
> required="false" stored="false"/>
> <field name="AllChamp_fr" type="text_fr" multiValued="true" indexed="true"
> required="false" stored="false"/>
> <field name="AllChamp_en" type="text_en" multiValued="true" indexed="true"
> required="false" stored="false"/>
>
> <dynamicField name="*_en" type="text_en" indexed="true" stored="true"
> required="false" multiValued="true"/>
> <dynamicField name="*_fr" type="text_fr" indexed="true" stored="true"
> required="false" multiValued="true"/>
> <dynamicField name="*_ar" type="text_ar" indexed="true" stored="true"
> required="false" multiValued="true"/>
>
> <copyField source="*_ar" dest="AllChamp_ar"/>
> <copyField source="*_fr" dest="AllChamp_fr"/>
> <copyField source="*_en" dest="AllChamp_en"/>
>
>
> and on config this is SearchHandler but i dont find any result:
>
> <requestHandler name="/browse" class="solr.SearchHandler">
>      <lst name="defaults">
>        <str name="echoParams">explicit</str>
>
>
>        <str name="wt">velocity</str>
>        <str name="v.template">browse</str>
>        <str name="v.layout">layout</str>
>        <str name="title">Solritas</str>
>
>
>        <str name="defType">edismax</str>
>        <str name="qf">
>            AllChamp^2.0 AllChamp_ar^2.0 AllChamp_en^2.0 AllChamp_fr^5.0
>            </str>
>        <str name="df">AllChamp_fr</str>
>        <str name="mm">100%</str>
>        <str name="q.alt">*:*</str>
>        <str name="rows">10</str>
>        <str name="fl">*,score</str>
>
>        <str name="mlt.qf">
>          AllChamp^2.0 AllChamp_ar^2.0 AllChamp_en^2.0 AllChamp_fr^5.0
>        </str>
>        <str
> name="mlt.fl">AllChamp,AllChamp_fr,AllChamp_ar,AllChamp_en</str>
>        <int name="mlt.count">3</int>
>
>
>        <str name="facet">on</str>
>        <str name="facet.field">cat</str>
>        <str name="facet.field">manu_exact</str>
>        <str name="facet.field">content_type</str>
>        <str name="facet.field">author_s</str>
>        <str name="facet.query">ipod</str>
>        <str name="facet.query">GB</str>
>        <str name="facet.mincount">1</str>
>        <str name="facet.pivot">cat,inStock</str>
>        <str name="facet.range.other">after</str>
>        <str name="facet.range">price</str>
>        <int name="f.price.facet.range.start">0</int>
>        <int name="f.price.facet.range.end">600</int>
>        <int name="f.price.facet.range.gap">50</int>
>        <str name="facet.range">popularity</str>
>        <int name="f.popularity.facet.range.start">0</int>
>        <int name="f.popularity.facet.range.end">10</int>
>        <int name="f.popularity.facet.range.gap">3</int>
>        <str name="facet.range">manufacturedate_dt</str>
>        <str
> name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
>        <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
>        <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
>        <str name="f.manufacturedate_dt.facet.range.other">before</str>
>        <str name="f.manufacturedate_dt.facet.range.other">after</str>
>
>
>        <str name="hl">on</str>
>        <str name="hl.fl">content features title name</str>
>        <str name="hl.encoder">html</str>
>        <str name="hl.simple.pre">&lt;b&gt;</str>
>        <str name="hl.simple.post">&lt;/b&gt;</str>
>        <str name="f.title.hl.fragsize">0</str>
>        <str name="f.title.hl.alternateField">title</str>
>        <str name="f.name.hl.fragsize">0</str>
>        <str name="f.name.hl.alternateField">name</str>
>        <str name="f.content.hl.snippets">3</str>
>        <str name="f.content.hl.fragsize">200</str>
>        <str name="f.content.hl.alternateField">content</str>
>        <str name="f.content.hl.maxAlternateFieldLength">750</str>
>
>
>        <str name="spellcheck">on</str>
>        <str name="spellcheck.extendedResults">false</str>
>        <str name="spellcheck.count">5</str>
>        <str name="spellcheck.alternativeTermCount">2</str>
>        <str name="spellcheck.maxResultsForSuggest">5</str>
>        <str name="spellcheck.collate">true</str>
>        <str name="spellcheck.collateExtendedResults">true</str>
>        <str name="spellcheck.maxCollationTries">5</str>
>        <str name="spellcheck.maxCollations">3</str>
>      </lst>
>
>
>      <arr name="last-components">
>        <str>spellcheck</str>
>      </arr>
>   </requestHandler>
>
>
> thanks,
> best regards
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/CopyField-can-t-copy-analyzers-and-Filters-tp4144803p4145018.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message