eDisMax field aliasing?

defType=edismax
q=sysadmin name:Mike
qf=title text last_name first_name
f.name.qf=last_name first_name

https://lucene.apache.org/solr/guide/7_3/the-extended-dismax-query-parser.html

See also:
https://github.com/arafalov/solr-indexing-book/blob/master/published/languages/conf/solrconfig.xml

Regards,
   Alex.
P.s. You can also merge/rename/combine those fields using
UpdateRequestProcessors potentially, if that's more suitable.


On 27 June 2018 at 15:04, Grimes, Kevin M (398F)
<kevin.m.gri...@jpl.nasa.gov> wrote:
> Hi all,
>
> I have a unique situation that I’m not quite sure how to approach.
>
> In my current Solr collection, I have documents that look like this:
>
> {
> “fieldA”: 1,
> “fieldB”: 2,
> “fieldC”: 3
> }
>
> We’re adding a new “type” of document, that looks like this:
>
> {
> “fieldD”: 1,
> “fieldE”: 2,
> “fieldF”: 3
> }
>
> The issue is, “fieldA” and “fieldD”, although they have different names, 
> store the same sorts of values. In this example, the same is true for B & E, 
> C & F.
>
> I want to be able to search, for example, like this: “q=fieldA:1” and have it 
> return both the first document and the second one, too, since fields A & D 
> are equivalent, and they both store 1. However, I would also like to have a 
> query for “q=fieldD:1” return the same response.
>
> Is the best approach to solving this kind of problem to have a third field, 
> for example, “fieldG”, and have “fieldA” and “fieldD” copy it? Or is there a 
> cleaner solution?
>
> Thanks,
> Kevin Grimes
> 398F – Data Product Generation Software
> o: 818-354-0263 c: 818-940-4727
> kevin.m.gri...@jpl.nasa.gov<mailto:kevin.m.gri...@jpl.nasa.gov>
>

Reply via email to