Hi everybody.

I'm here again with my doubts. Thank you for your patience. ^^

I have a database of trademarks with a full-text index for two nodes:
**:mark-identification,*:party-name*. [1]

Where "*mark-identification*" contains the name of the trademark, and "
*party-name*" contains the name of the owner of the trademark.

I use the full-text index in order to search trademarks by its name,
for example:

*for $results in //case-file[case-file-header/mark-identification/text()
contains text {'basex'}]*
*return $results//mark-identification*

returns all trademarks with "*basex*" on its name. It works like a
thunderlight: 15ms to get 3 records among 2,134,434,598 nodes. Really a
dream. [2]

But, for example, if I change the searched text from "*basex*" by a common
word in "*party-name*", for example, "*corporation*" ( has 1096187x
occurrences on the full-text index as showed in [1], it's a very common
word in owners of trademarks ):

*for $results in //case-file[case-file-header/mark-identification/text()
contains text {'corporation'}]*
*return $results//mark-identification*

It takes a long time to get 6,715 records: 62,000ms [3]

If I search for "*live*" ( a common word for trademarks name, but not for
owners names ) I get 5,875 records in 2,773 ms, which has not a
relationship with the 62,000ms to get the 6k records for "*corporation*".


   - Is this an expected behaviour?
   - Is there a way to specify which "section" of the full-text index
   should be used to perform the search? ( I don't know... maybe something
   similar to "*using stemming*" but "*using index 'mark-identification'*" )

Please apologize me if I'm asking by something not-logical,

Best regards,

[1] https://imgur.com/uLla1Xt
[2] https://imgur.com/Fkcvv2O
[3] https://imgur.com/Hk71CNe
[4] https://imgur.com/P72k574

Reply via email to