Archive for August, 2009

Microsoft Search LIKE statement oddity

Monday, August 31st, 2009

I was working on a project involving Search server and building a search query according to user input, I had stumbled upon a weird bug in the LIKE statement, which caused the query to miss out on relevant data. simply put, the like statement will fail on long strings, I was trying to compare some long pipe concatenated metadata as follows “|item a|item b|…” the LIKE statement would work for item A but for items further along the line it failed silently, not returning results. i counted to the threshold, it was 64 characters. that was odd. searching this issue returned nothing (like is a difficult search term) so I solved the problem with plan B and carried on.

Today i came across a post stating that this in fact is a known limitation, known to who you might ask?

Well, to Steve Curran MVP which cleverly disclose : 

"Yes this is a known limitation. You should avoid using the LIKE predicate in FullTextSQL and use the CONTAINS predicate. It works very well with the Path managed property. In you case just do CONTAINS(Path,’http://servername/sitename/listname/folder’)."

Thank you Steve.

Indeed using a CONTAINS statement will solve the problem and will not (in my specific case) impact rank.

If you read this, HTH.

The Jewish Budha

Sunday, August 30th, 2009

 

The Jewish Buddha says:

If there is no self, whose arthritis is this?

Be here now. Be someplace else later. Is that so complicated?

Drink tea and nourish life; with the first sip, joy; with the second sip, satisfaction; with the third sip, peace; with the fourth, a Danish.

Wherever you go, there you are. Your luggage is another story.

Accept misfortune as a blessing. Do not wish for perfect health, or a life without problems. What would you talk about?

The journey of a thousand miles begins with a single Oy.

There is no escaping karma. In a previous life, you never called, you never wrote, you never visited. And whose fault was that?

Zen is not easy. It takes effort to attain nothingness. And then what do you have? Bupkis.

The Tao does not speak. The Tao does not blame. The Tao does not take sides. The Tao has no expectations. The Tao demands nothing of others. The Tao is not Jewish.

Breathe in. Breathe out. Breathe in. Breathe out. Forget this and attaining Enlightenment will be the least of your problems.

Let your mind be as a floating cloud. Let your stillness be as a wooded glen. And sit up straight. You’ll never meet the Buddha with such rounded shoulders.

Deep inside you are ten thousand flowers.  Each flower blossoms ten thousand times. Each blossom has ten thousand petals.  You might want to see a specialist.

Be aware of your body. Be aware of your perceptions.  Keep in mind that not every physical sensation is a symptom of a terminal illness.

The Torah says, Love your neighbor as yourself.  The Buddha says, There is no self.  So … maybe we’re off the hook?

excellent by The Big Picture

Searching documents in MOSS 2007

Sunday, August 9th, 2009

I’m doing some work on SharePoint search recently. while the tool is fairly impressive, it comes with its own pitfalls, one of them I will discuss now: from a certain content scope, you want to return only documents, the scope contains content crawled from a web site file share, external to SharePoint. this is somewhat less common and most examples do not refer to it which may be the cause to this peculiarity. now searching the web on how to go along with this requirement will result with several suggestions :

1. add a scope property rule : IsDocument = 1 – not working, no results are returned from any query (not to try on production)

2. add your query with different variations of : (“IsDocument” = 1) – gives an array of weird results and COM exceptions

3. add your query with : freetext(DEFAULTPROPERTIES,’IsDocument:1’) – this is actually documented to be unsupported  and while it did gave promising results, further tests proved it to be inaccurate and insufficient.

so after much fiddling with scope rules I came up with the following solution, since folders do not have contenttype I created a scope rule like so: [contenttype = ] , yes blank. it works for me, hope it will work for you too.

contentTypeRule