Indexing Service and regex
Hi All,
I have problem while querying indexing service. I can run query using regular expression like this
Code:
{prop name=filename}{regex}|[0-9].doc{/regex}
But it looks like it doesn’t work while trying use redex on contents fo files which is exactly what I wan to do. Search for files that contains given pattern
Even something as simple as
Code:
{prop name=Contents}{regex}.*{/regex}
Doesn’t work.
Any ideas how can I run search for given pattern inside files? Any suggestions are welcome.
Re: Indexing Service and regex
If you are using an expression query, you should have a # in front of Contents. Give that a try.
Re: Indexing Service and regex
Alas. I've tried it (MS calls it Dialect 1 - my samples are in Dialect 2) and nothing has changed. Is it possible that regular expressions can't be used with Contents property?
Re: Indexing Service and regex
That could be the case. You may have to stick with {freetext} text {/freetext} to accomplish what you want. Freetext allows you to take the words out of order. Using {phrase} text {/phrase} does not.
Re: Indexing Service and regex
Yes, but I want to use regular expressions. Alas I have found in documentation something that seems to close the case.
Quote:
Regular expressions are sets of symbols that you use to create queries to match property values in properties other than Contents and All.
Still can't understand why, but obviously what I want to achieve can not be done using indexing service. Appreciate your effort. Thanks.
Re: Indexing Service and regex
Yeah, I just came across that as well. Sorry that there isn't anything more.