lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grimes, Kevin M (398F)" <>
Subject Storing documents with multiple primary keys
Date Wed, 27 Jun 2018 19:04:14 GMT
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

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?

Kevin Grimes
398F – Data Product Generation Software
o: 818-354-0263 c: 818-940-4727<>

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