How to search in content file and not in indexed metadata with DQL query in java

Hello,

I am wondering how to search in content file but not in indexed metadata with DQL query.
With the following query : SELECT * FROM "dm_documents" SEARCH DOCUMENT CONTAINS 'hello'
I get documents that matches the condition in content files but also documents that matches the condition in indexed metadata which is the expected behavior.

I need to get documents that only matches the condition in content files.

I tried to add dfc.search.xquery.generation.enable=false and dfc.dqlhints.file=/opt/spring/secrets/app/dfc-dqlhints.xml
with the following content :
<?xml version="1.0" encoding="UTF-8"?>
<RuleSet>
  <Rule>
  <Condition>
    <DisableFTDQL />
    </Condition>
  </Rule>
</RuleSet>

Still, the query continues to get the same result.

Could you explain me what configuration did I miss ? Or if I need to add something in the query ?

Thanks in advance,

Greetings

Comments

  • Since attribute values are applied to the index during the same process as the content is indexed, I'm not sure if you can only filter content only searching.  I know you can apply more/less weighting on values from attributes and content and matching algorithm will use this as part of relevancy scoring, but I think you may have to re-index your repository to get new weightings.  My suggestion is that you review the Search Development Guide to see if there is anything in there that might be helpful.