Lucene ISNULL query

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2014 06:38 PM
Hi all,
does anyone have any in-depth experience with this query?
Basically, if you do a simple query on a repository that is not empty, it will fail miserably with the maxClauseCount error. I could go about setting it higher, but then it's just a matter of time before I hit it again.
Let's imagine a query along the lines of:
If you look at what that query produces, you will see something like this:
So, it basically removes what it finds with the ISNULL part from the ASPECT part of the query, and since it tries to find all possible values for barCode, it hits the maxClauseCount.
Any way around this?
Thanks!
does anyone have any in-depth experience with this query?
Basically, if you do a simple query on a repository that is not empty, it will fail miserably with the maxClauseCount error. I could go about setting it higher, but then it's just a matter of time before I hit it again.
Let's imagine a query along the lines of:
ASPECT:"cm:folder" AND ISNULL "cm:barCode"
If you look at what that query produces, you will see something like this:
+(ASPECT:{http://www.contentModel.com/model/content/1.0}folder) +(+MatchAllDocsQuery -(@{http://www.contentModel.com/model/content/1.0}barCode:* @{http://www.contentModel.com/model/content/1.0}barCode:{en}*))
So, it basically removes what it finds with the ISNULL part from the ASPECT part of the query, and since it tries to find all possible values for barCode, it hits the maxClauseCount.
Any way around this?
Thanks!
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2014 01:30 AM
I do not think cm:barCode is part of out of box content model. What you are trying to do with this query?
Your first part for query is also not correct as you should be using TYPE instead of aspect.
You need to narrow down to your custom content type in case you want to search within those contents only.
Your first part for query is also not correct as you should be using TYPE instead of aspect.
You need to narrow down to your custom content type in case you want to search within those contents only.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2014 03:34 AM
I was simply typing those names from my head, for the sake of an example. The problem is in the "barBode:*" part of query, which is obviously a part of how the the whole "ISNULL" part works.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2014 11:46 AM
For anyone interested, I simply ended up doing a Lucene search without the problematic part, and checking for property existance on found nodes. Any other comments are still welcome.
Cheers!
Cheers!
