Probably a typo but I think you mean qf rather than pf? They’re both actually valid, but pf is “phrase field” which will give different results….
Best, Erick > On Aug 12, 2020, at 5:26 AM, Edward Turner <eddtur...@gmail.com> wrote: > > Many thanks for your suggestions. > > We do use edismax and bq fields to help with our result ranking, but we'd > never thought about using it for this purpose (we were stuck on the > copyfield pattern + df pattern). This is a good suggestion though thank you. > > We're now exploring the use of the pf field (thanks to Alexandre R. for > this) to automatically search on multiple fields, rather than relying on df. > > Kind regards, > > Edd > -------------------- > Edward Turner > > > On Tue, 11 Aug 2020 at 15:44, Erick Erickson <erickerick...@gmail.com> > wrote: > >> 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 >>>> >> >>