cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene Search Problem

velli
Champ in-the-making
Champ in-the-making
Hi All,

I have this problem with a lucene search started from a Alfresco javascript that has got me stumbled.

var docs = search.luceneSearch ("(PATH:\"/app:company_home/cm:Company/cmSmiley FrustratedomeContent/cm:Category//*\") AND (TYPE:\"cm:content\") AND (@cm\\:name:\"" + "my filename.html"+ "\")");

We use 2.9B build 683 on a test and production machine running both windows 2003 server with sqlserver. Which I thought had the same configuration.

In a subfolder of category is the actual file : "my filename.html"

On the test system the result of the search is 1, the file mentioned above. On production the same query result in 0.

Any pointers where to look would be greatly appriciated.

Kind regards,

Velli
2 REPLIES 2

rivarola
Champ on-the-rise
Champ on-the-rise
Hello,

Do you have the same OS and user locale on both servers ?

fhomasp
Champ in-the-making
Champ in-the-making
I had this problem too, not just limited to the above mentioned problem.
I executed several of the same Lucene searches using the SDK from 2.9B.  I executed one after the other by executing the same main method multiple times.  The result was very often 0 or the expected result.  However I couldn't find a pattern to when it would work and when it wouldn't work.  The same query searches providing different results is unacceptible.  Hence I decided not to use it anymore.

For finding content I used a wildcard when searching, this worked in 100% of the cases.  Then I iterated over the resultset and I took from those iterations what I needed.  It's not very performant but it'll have to do for now.