cancel
Showing results for 
Search instead for 
Did you mean: 

searching problem

gashish
Champ in-the-making
Champ in-the-making
Hi Friends,

I am facing a search problem.

Here I explain the problem:
Suppose my application has a asset in the repository with a title(store as an aspect) "ash" in a prticular folder.Now i am going to search on this folder.
Search queries and there results
1-Search query:
      @\{http\://www.alfresco.org/model/content/1.0\}title:ash AND TYPE:"{http://www.alacre.com/cms/content-model-1.0}asset"
return the node that has a title "ash".

2-Search query:
     @\{http\://www.alfresco.org/model/content/1.0\}title:a AND TYPE:"{http://www.alacre.com/cms/content-model-1.0}asset"
return the node that has a title "ash".

Why both query return the same result? :roll:
I want to write a query which return the node only when the searchString strictly match with the title of that particular node.


Thanks,
Ashish
4 REPLIES 4

andy
Champ on-the-rise
Champ on-the-rise
Hi

I normally use the prefix to set:

required (+),

optional but at least one optional thing must match if there are no + or - entries (no prefix)

and not required (-)

Try


+@\{http\://www.alfresco.org/model/content/1.0\}title:ash  +TYPE:"{http://www.alacre.com/cms/content-model-1.0}asset"


It looks like A AND B is not the equivalent of +A +B for some reason.
It is "A +B" - B must match and A is optional so in fact does not matter.
The token "a" would not normally be in the index.

This probably returns nothing.


+@\{http\://www.alfresco.org/model/content/1.0\}title:a

The only change I can recall to the default lucene query parser is to allow wild cards at the start of wild card expressions.

I have raised this. AR-384

Regards

Andy

gashish
Champ in-the-making
Champ in-the-making
Hi Andy,

I tried the query you posted but my problem still persist.

Thanks,
Ashish Garg

andy
Champ on-the-rise
Champ on-the-rise
Hi

Are you doing this search through the UI using our Advanced search or are you building the lucene query direct?

Does the query

@\{http\://www.alfresco.org/model/content/1.0\}title:a

return results on its own? (with out the type restriction)

Regards

Andy

gashish
Champ in-the-making
Champ in-the-making
Hi Andy,

Yes, I build my query through the UI interface.I used a general function that build up the query according the UI value.


Ashish Garg