Search code examples
odatasensenet

Sensenet : Search documents by its content


I can see the document list can be searched by matching a value of document properties. But I need to search document list which has a specific word in their content. How can I achieve this by oData.svc query?

Is it possible using Lucene Index concept? If yes then how?

Updated

I am working with Sense/Net 6.3.0.6337 Community Version.

I have tried to achieve it by following query

https://example.com/OData.svc/workspaces/Document/abcd_gmail_com/Document_Library/?metadata=no&$select=*&query=Taruna

It is working for .docx and .txt files only but doesn't work for .xml and .pdf file.

Is it sensenet version issue?

Thanks


Solution

  • You can add a query string argument called "query" to each and every GET request, e.g. http://www.example.com/OData.svc/?$select=Name,Index,Icon&query=about
    returns content that contain "about" from the whole requested site

    You can find more examples here in the Custom Query Options section