Solr
  1. Solr
  2. SOLR-3955

Return only matched multiValued field

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: search
    • Labels:

      Description

      Assuming a multivalued, stored and indexed field named "comment". When performing a search, it would be very helpful if there were a way to return only the values of "comment" which contain the match. For example:

      When searching for "gold" instead of getting this result:

      <doc>
      <arr name="comment">
      <str>Theres a lady whos sure</str>
      <str>all that glitters is gold</str>
      <str>and shes buying a stairway to heaven</str>
      </arr>
      </doc>

      I would prefer to get this result:

      <doc>
      <arr name="comment">
      <str>all that glitters is gold</str>
      </arr>
      </doc>

      (psuedo-XML from memory, may not be accurate but illustrates the point)

      Thanks.

        Activity

        Hide
        Sandeep Tucknat added a comment - - edited

        This is especially important in a spatial search since there's an important business case of finding the branches/locations for an entity within a spatial filtering query. While the multi-valued spatial field implementation provides for filtering and scoring, it does not return this information to the client at the moment.

        PS : I am relatively new to Solr and SE in general but have years of Java coding and debugging experience. I'd love to help resolve this if someone can point me in the right direction and something more than 'hook it up to the debugger and start looking' would be appreciated.

        Show
        Sandeep Tucknat added a comment - - edited This is especially important in a spatial search since there's an important business case of finding the branches/locations for an entity within a spatial filtering query. While the multi-valued spatial field implementation provides for filtering and scoring, it does not return this information to the client at the moment. PS : I am relatively new to Solr and SE in general but have years of Java coding and debugging experience. I'd love to help resolve this if someone can point me in the right direction and something more than 'hook it up to the debugger and start looking' would be appreciated.

          People

          • Assignee:
            Unassigned
            Reporter:
            Dotan Cohen
          • Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:

              Development