cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene Index by d:noderef

cgonzalez
Champ on-the-rise
Champ on-the-rise
Hi,

I want to know if it's posible to add a property of type d:noderef and indexed by it. It is posible to index by a d:noderef property?

Thanks
5 REPLIES 5

bremmington
Champ on-the-rise
Champ on-the-rise
I could also do with more information on this topic.

If I define a type that has a d:noderef property on it, how should I specify the index options on that property? Should it be tokenised or not? Should I store the value or not?

Once indexed, how do I use the value in a query? Say, for example, my custom type is "myapp:MyType" and it has a noderef property defined called "myappSmiley SurprisedtherNode". I want to find all nodes of type "myapp:MyType" whose "myappSmiley SurprisedtherNode" property points at a node with reference "workspace://SpacesStore/1df35ea4-2bfa-11dd-84cc-c537ba4aa329". How do I do that? What would the Lucene query look like?


Regards
Brian

bremmington
Champ on-the-rise
Champ on-the-rise
Some advice on this topic would be greatly appreciated.


Regards
Brian

mickael_istria
Champ in-the-making
Champ in-the-making
Hello,

I have the same question: "How can I write search queries dealing with d:noderef?"
Did anyone found an answer, or a workaround?

Thanks in advance
Mickael

mickael_istria
Champ in-the-making
Champ in-the-making
I found my solution thanks to Luke utility:

if you want to write a query that checks a noderef attribute, simply write
@prefix\:nodeRefAttribute:"nodeRef.toString()"

for example, I get
@ip\Smiley SurprisedbservedNodes:"workspace://Test_xxxxxxxx/xxxxxxx-xxxx-xxxx-xxxx[…]xxx"
and it works.

Hope that may help someone one day
Mickael

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

You do not need tokenise nodeRef properties.
They do not have their own special tokeniser - so you need the option in the DD.

Most of the time things will be fine so long as you use the full node ref in a phrase query.
Tokenisation will help reduce the idnex size a bit - however tokenisation has not much meaning here - what does searching on a token mean (eg the - separated bits fo the guid) ?

Andy