Solr configuration to match multiple object property values

Hello all,

Given the static list [foo, foo bar, foo/bar] property of an object (XWiki.TagClass), I would like to get all the documents that have any of these terms in the object and to also highlight all the occurrences in the search results, excluding any other object type that may contain any of these terms.
I do not necessarily need to have a facet for the Tag so I only added property.XWiki.TagClass.tags in queryFields, in DOCUMENT, in Main.SolrSearchConfig.

'queryFields': {
    'DOCUMENT': 'title^10.0 name^10.0
                 objcontent^0.4 filename^0.4 attcontent^0.4 doccontentraw^0.4
                 author_display^0.08 creator_display^0.08
                 comment^0.016 attauthor_display^0.016 spaces^0.016',
    'ATTACHMENT': 'filename^5.0 attcontent attauthor_display^0.2',
    'OBJECT': 'objcontent',
    'OBJECT_PROPERTY': 'propertyvalue'

In the following image, which can be easily reproduced by adding the above customization and searching for foo term, the matching sequences are identified as individual tags in the Objects section, but only the exact matching is displayed in the Tags section.
I am looking for a way to make the Tags section to display all the results that are displayed in the Objects section.
I hope that I managed to make myself clear and maybe somebody has a clue about how to achieve this.


I am looking for a way to make the Tags section to display all the results that are displayed in the Objects section.

We can add a new source for searching the tags in Global Administration: Search Suggest, and customize the query for it.

Looks a bit mess, but it works
engine solr
service Solr Suggestestion Service

qf=property.XWiki.TagClass.tags:foo bar

limit 3
highlight & activate are activated

@nikpetrenko this doesn’t seem to help with my problem. I still can’t see all the related terms in the tags section
Screenshot from 2022-10-03 14-50-46


Yes, because objcontent and property.XWiki.TagClass.tags are indexed differently. If you enable debug mode on the search you’ll see that:

  • the generated query is different for objcontent and property.XWiki.TagClass.tags:
    • objcontent_en:foo | objcontent__:foo
    • property.XWiki.TagClass.tags__:foo | property.XWiki.TagClass.tags_string:foo | property.XWiki.TagClass.tags_en:foo | property.XWiki.TagClass.tags_boolean:F
  • the matched fields are:
    • 0.058886815 = weight(property.XWiki.TagClass.tags_string:foo in 2) [SchemaSimilarity], result of:
    • 1.9084475 = weight(objcontent_en:foo in 2) [SchemaSimilarity], result of:

Then, if you check the Solr schema, you’ll see that these two matched fields are indexed differently:

So the reason you see only “Tags: foo” is because only that tag is matched by the “foo” search.

Thanks @mflorea!