How can I add the option to hide pdf content from being indexed and appearing on search document
currently we have different category documents in my products and we are showing document Title and Description as PDF scrapped content(document file) on the search result.
As per the new requirement one of category type documents should show only Document Title on the search result and this has been done with help of UI changes(category filters).
But the problem is when i search with pdf content(text) which is attached to document are showing on the search result, This should not be a case. We should show only on the search results when search with document Title.
How to hide the document from search results when we search with pdf content.? The Basic purpose of the requirement is to have the pdf content not be indexed on the particular document type category.
Kindy help me on this Thanks in advance.
If I understand correctly, you want to disable the free-text search on the document body for a specific set of documents. One way to achieve that goal would be to not index the PDF content for those documents. This can be done using post conversion scripts. Here is a sample showing how to override the document body. In your specific case, you would set the document body to an empty string.
The drawback is that you would have no more quickview for those documents.
I hope this helps