How to query custom metadata in Solr | Community
Skip to main content
Level 6
October 16, 2015
Solved

How to query custom metadata in Solr

  • October 16, 2015
  • 3 replies
  • 1844 views

Experts,

I've done Solr integration with Remote solr server and all the indexes were created, everything is fine.

Problem: I am not getting search result when I tried with OOTB metadata (dc:title) images though DAM Console search and asset viewer. It works only when I search on the node name GeoCube_Datasheet.pdf (Node name of type dam:Asset) . After I added a custom metadata for an Asset under jcr:content/metadata node, lets say dam:custom of type String, after I added another node under oak:index with below properties : jcr:primaryType=oak:QueryIndexDefinition, reindex=true ( type Boolean) , propertyNames=dam:custom (type Name[]), type = property (type String). After I modified schema.xml of Solr as : <field name="dam:custom" type="matchall" />

After doing above configuration I can see the index is created in Solr Admin console. Solr admin console returns json output. 

"path_exact": "/content/dam/geometrixx/portraits/scott_reynolds.jpg/jcr:content/metadata", "jcr:primaryType": [ "nt:unstructured" ],

"dam:custom": [ "helloworld" ],

But When I do fulltext search in DAM console/ Asset viewer then Querybuilder does not return anything. But When I use default search engine (Lucene) then it returns records based on custom metadata. 

For testing purpose when I executed this http://localhost:4502/bin/querybuilder.json?fulltext=helloworld&type=dam:Asset then it does not return anything but it returns resukt when I executed http://localhost:4502/bin/querybuilder.json?fulltext=helloworld&type=nt:unstructured

Attached is the full query parameter used by Querybuilder while making search query. Please let me know what I'm missing here and how to get search result based on metadata

 

Thanks for your help!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

THis may be a bug. Please file a ticket.

3 replies

Level 6
October 16, 2015

Any help here? I'm not able to get the desired result with OOTB metadata(dc:title) also !

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

THis may be a bug. Please file a ticket.

Level 2
October 16, 2015

If i search for custom metadata while using embedded Solr server , will it use Solr index ? 

How can i identify it is using Solr index for the query . There are ACS tools to identify this but it is giving me same name always ?