why not use a copyfield for indexing? On Tue, Aug 11, 2020 at 9:59 AM 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 >