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

Hello,

I'm using FileLocator Pro to index my codebase. I'm not understanding some of the results I'm getting when including parentheses in my searches.

Let's say I'm searching for ToString("X8").

First, if I run a non-indexed search by plain text or whole word, I get the results I'm expecting:

Now, if I run an index search through the GUI for just X8, I also get the results I'm expecting (excluding files with "\packages" in their path):

Searching the index for ToString("X8") through the GUI doesn't work, because, for reasons I don't understand, the option to choose the "containing text" expression type is not exposed here:

So, I tried some alternatives.

If I search for ToString("X8" (omit the closing parentheses), I do not get the results expected:

If I try by command line, which does provide an option for specifying the "containing text" expression, and use the exact same search values as in the above non-indexed searches, it gives an expression error no matter:

Could you please help me make sense of this? Am I doing something wrong?

by (110 points)

1 Answer

0 votes
 
Best answer

When using the classic 'Expert' search interface the search compares against the source text and can match exactly, however, when using an index search you need to think about how the source text will be indexed. For example, the text:

ToString("X8")

Will produce 2 tokens:

1. ToString
2. X8

An index search is matched on the term database and not the source document so you can search for 'ToString' and 'X8' but the other information has not been indexed and therefore has to be inferred.

The reason for the other issue was that your 'Expert' search used the 'Plain Text' expression option which matches EXACTLY against the text but the Index Search uses Boolean expressions, and quotes are used to specify phrases and are not part of the search term, e.g.

"The quick brown"

searches for the phase 'the quick brown' but not the surrounding quotes.

If you need precise code searching I would not recommend using index searching, which is designed for normal text documents.

by (73.8k points)
...