Have you explored edismax?

> On Aug 11, 2020, at 10:34 AM, Alexandre Rafalovitch <arafa...@gmail.com> 
> wrote:
> 
> I can't remember if field aliasing works with df but it may be worth a try:
> 
> https://lucene.apache.org/solr/guide/8_1/the-extended-dismax-query-parser.html#field-aliasing-using-per-field-qf-overrides
> 
> Another example:
> https://github.com/arafalov/solr-indexing-book/blob/master/published/languages/conf/solrconfig.xml
> 
> Regards,
>    Alex
> 
> On Tue., Aug. 11, 2020, 9:59 a.m. Edward Turner, <eddtur...@gmail.com>
> wrote:
> 
>> Hi all,
>> 
>> Is it possible to have multiple "df" fields? (We think the answer is no
>> because our experiments did not work when adding multiple "df" values to
>> solrconfig.xml -- but we just wanted to double check with those who know
>> better.) The reason we would like to do this is that we have two main field
>> types (with different analyzers) and we'd like queries without a field to
>> be searched over both of them. We could also use copyfields, but this would
>> require us to have a common analyzer, which isn't exactly what we want.
>> 
>> An alternative solution is to pre-process the query prior to sending it to
>> Solr, so that queries with no field are changed as follows:
>> 
>> q=value -> q=(field1:value OR field2:value)
>> 
>> ... however, we feel a bit uncomfortable doing this though via String
>> manipulation.
>> 
>> Is there an obvious way we should tackle this problem that we are missing
>> (e.g., which would be cleaner/safer and perhaps works at the Query object
>> level)?
>> 
>> Many thanks and best wishes,
>> 
>> Edd
>> 

Reply via email to