Welcome to the Mythicsoft Q&A site for:

- Agent Ransack
- FileLocator Lite
- FileLocator Pro

Please feel free to ask any questions on these products or even answer other community member questions.

Useful Links:

- Contact Us
- Help Manuals
- Mythicsoft Home
0 votes

I need to find a single pattern match in a file, but have a lot of big file.
Is it possible in FileLocator Pro to instruct to move immediately to next file after finding a match?

asked by (60 points)

1 Answer

0 votes
 
Best answer

Yes, if you switch OFF Calculate Hit Count FileLocator Pro moves to Just In Time (JIT) searching:
http://help.mythicsoft.com/filelocatorpro/en/index.html?search_settings.htm

Basically it'll stop searching the file once it has enough information to confirm a search result. When you go to view the hits of the file it'll resume the search to get the remaining hits.

If you only want to display the first hit (ie you don't want the 'resume' behaviour) change the Max displayed lines per file to 1:
http://help.mythicsoft.com/filelocatorpro/en/display_settings.htm

If you KNOW that the text is at the start of the file you can specify that the search should only search the first X lines, e.g.

LINES:0-50 SearchTerm

Caching

If you're trying to speed up the searches of non-text files (e.g. PDF, DOC etc) most of these techniques won't make much difference since the majority of the time searching non-text files is the actual conversion to text. To speed up non-text file searching switch on the Caching functionality for much faster searching:

http://help.mythicsoft.com/filelocatorpro/en/index.html?cache_settings.htm

answered by (67.2k points)
I voted as this is a best answer, because this is how it was stated in the manual, BUT even with Hit Count off it still continues to find ALL instances in the file.
Seems like a bug for me
Why do you think it's trying to find ALL instances in a file during the search?
I do not think, just report the fact
just to clarify: Calculate Hit Count Box is unchecked.
I created a test file containing 4 lines of your question:
Why do you think it's trying to find ALL instances in a file during the search?
Why do you think it's trying to find ALL instances in a file during the search?
Why do you think it's trying to find ALL instances in a file during the search?
Why do you think it's trying to find ALL instances in a file during the search?

After running search in FLP for "ALL" the result is 4 hits:
Name     Location Modified             Hits Line Text                                                                            
                                                                                                                                 
test.txt D:\test\ 3/29/2015 6:19:57 PM 4    1    Why do you think it's trying to find ALL instances in a file during the search?
test.txt D:\test\ 3/29/2015 6:19:57 PM 4    2    Why do you think it's trying to find ALL instances in a file during the search?
test.txt D:\test\ 3/29/2015 6:19:57 PM 4    3    Why do you think it's trying to find ALL instances in a file during the search?
test.txt D:\test\ 3/29/2015 6:19:57 PM 4    4    Why do you think it's trying to find ALL instances in a file during the search?
During the search FLPro will stop at the first hit but as soon as you try to display the hits FLPro will re-search the file for the remaining hits. If you just want the first hit displayed you can change the 'Max displayed lines per file', I've modified the answer for reflect this.
Even if I do not have hits tab opened, but text tab, or report tab, they show 4 hits no matter what.
I also test the feature on a set of big files, and search takes the same 9 minutes 34 seconds with both configuration.
Could you please provide example, which shows this claimed feature?
It's a hard one to see because if EVER the hits are required the search is completed for the file. If you hide the contents tab (Window->Contents view->Hide) you should see the effect. Don't forget, files without any hits will be read to the end. It's only beneficial if a file has lots of hits or the hits are right at the start of the file.
Thank You for clarification, and my situation is just as you mentioned. I am searching ISBN in ebooks
If you're searching non-text files (e.g. PDFs) make sure you switch on the Caching functionality for much faster searching. The majority of the time searching non-text files is the actual conversion to text.
I already use LINES operator, no difference in time of search, HOWEVER caching DRAMATICALLY changes consequent searches after initial. Hint: size of caching per item should be bigger than the largest file. I see speed increase about 200 (!!!) times. So you are absolutely right the slowest operation is conversion from PDF to TXT. THANKS for your input!
Thanks. I've updated the answer to reflect your solution.
...