Hi !
I tried using NumericRange Search. I created a new document and added “1,2,3,5,10” in it.
It should give hits as 5 right ? Is this the way it works ?
But, I am getting total hits as 7 in the document.
Please guide me with it’s working, as nothing more than the code and basic one liner, is given on the website. So, please help me understand it’s working, what it counts, how it calculates the hits ?
This result is expected. Why? Because the index searches not only in text content of the document, but also in all other fields of the document.
And other fields like ‘creationdate’ and ‘modificationdate’ always contain numbers. In order to visualize this, add below code in your example project:
In get_item(0), you have to specify txt file position in my case txt file position is 2 as per below output:
inside for
1 hits are in D:\search\Data\Documents\Excel.xlsx
inside for
5 hits are in D:\search\Data\Documents\New Microsoft Word Document.docx
inside for
5 hits are in D:\search\Data\Documents\New Text Document.txt
You can see highlighted.zip (494 Bytes) results.
However, to search only in content field you should use query like in the following snippet:
@atirtahir3
Okay buddy, got the mechanism now.
Thanks for this ! It helped !
I am facing some problem with Password Protected Search. Anyways, I would create another topic for that.
Thanks, once again !