Click to See Complete Forum and Search --> : Indexing Service and regex


Mr. Tomaszek
July 18th, 2007, 05:59 AM
Hi All,
I have problem while querying indexing service. I can run query using regular expression like this

{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

{prop name=Contents}{regex}.*{/regex}

Doesn’t work.
Any ideas how can I run search for given pattern inside files? Any suggestions are welcome.

PeejAvery
July 18th, 2007, 08:00 AM
If you are using an expression query, you should have a # in front of Contents. Give that a try.

Mr. Tomaszek
July 19th, 2007, 02:39 AM
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?

PeejAvery
July 19th, 2007, 07:10 AM
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.

Mr. Tomaszek
July 19th, 2007, 07:45 AM
Yes, but I want to use regular expressions. Alas I have found in documentation something that seems to close the case. 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.

PeejAvery
July 19th, 2007, 08:27 AM
Yeah, I just came across that as well. Sorry that there isn't anything more.