AnsweredAssumed Answered

[Lucene] Same query returns different results

Question asked by damiar on Nov 13, 2008
Latest reply on May 14, 2009 by andy
Hi!

I'm having a strange behavior with a Lucene query… The problem is that if I execute a query I get some results, but if I execute the query AGAIN it returns differents results!

I mean:


logger.log('query:' + q);
var searchResults = search.luceneSearch(q);
for each (s in searchResults) {
   logger.log(s.name + ' - ' + s.properties['jwtti:comment']);
}

Console displays:

query: +PATH:"/app:company_home/cm:assetsLibrary/cm:comm_4370/cm:assets/*" AND (@cm\:name:"*mojoja*" OR @cm\:title:"*mojoja*" OR @cm\:description:"*mojoja*" OR @cm\:creator:"*mojoja*" OR @jwtti\:type:"*mojoja*" OR @jwtti\:referenceNumber:"*mojoja*" OR @jwtti\:comment:"*mojoja*" OR @jwtti\:application:"*mojoja*")

info.png - mojoJAEJAE
AlfrescoLogo32.png - mojojaja
goto.png - mojojaJA

And this is ok, because Lucene is matching fine…

But in some cases when I execute the query I get this:

query: +PATH:"/app:company_home/cm:assetsLibrary/cm:comm_4370/cm:assets/*" AND (@cm\:name:"*mojoja*" OR @cm\:title:"*mojoja*" OR @cm\:description:"*mojoja*" OR @cm\:creator:"*mojoja*" OR @jwtti\:type:"*mojoja*" OR @jwtti\:referenceNumber:"*mojoja*" OR @jwtti\:comment:"*mojoja*" OR @jwtti\:application:"*mojoja*")

ascii.png - mojojeje
cdbo_list.png - mojojiji
colorscm.png - mojojuju
info.png - mojoJAEJAE
gaim.png - mojojojo
AlfrescoLogo32.png - mojojaja
goto.png - mojojaJA

Any help? This is really strange!

Outcomes