Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
So I have some code that generates a string to use in a Lucene RawQuery. Here's an example of my string:
nodeName:(+John +Doe)^5 nodeName:John~0.6 Doe~0.6 firstName:(+John +Doe)^5 firstName:John~0.6 Doe~0.6 lastName:(+John +Doe)^5 lastName:John~0.6 Doe~0.6 bodyText:(+John +Doe)^5 bodyText:John~0.6 Doe~0.6 metaTitle:(+John +Doe)^5 metaTitle:John~0.6 Doe~0.6 metaDescription:(+John +Doe)^5 metaDescription:John~0.6 Doe~0.6
The query that is generated after passing it into RawQuery is search ever field in the Examine Index.
{ SearchIndexType: , LuceneQuery: nodeName:john doe~0.7 firstName:john doe~0.7 lastName:john doe~0.7 bodyText:john doe~0.7 metaTitle:john doe~0.7 metaDescription:john doe~0.7 (((+nodeName:john +nodeName:doe)^5.0) nodeName:john~0.6 (firstName:doe~0.6 lastName:doe~0.6 bodyText:doe~0.6 id:doe~0.6 nodeName:doe~0.6 updateDate:doe~0.6 writerName:doe~0.6 path:doe~0.6 nodeTypeAlias:doe~0.6 parentID:doe~0.6) ((+firstName:john +firstName:doe)^5.0) firstName:john~0.6 (firstName:doe~0.6 lastName:doe~0.6 bodyText:doe~0.6 id:doe~0.6 nodeName:doe~0.6 updateDate:doe~0.6 writerName:doe~0.6 path:doe~0.6 nodeTypeAlias:doe~0.6 parentID:doe~0.6) ((+lastName:john +lastName:doe)^5.0) lastName:john~0.6 (firstName:doe~0.6 lastName:doe~0.6 bodyText:doe~0.6 id:doe~0.6 nodeName:doe~0.6 updateDate:doe~0.6 writerName:doe~0.6 path:doe~0.6 nodeTypeAlias:doe~0.6 parentID:doe~0.6) ((+bodyText:john +bodyText:doe)^5.0) bodyText:john~0.6 (firstName:doe~0.6 lastName:doe~0.6 bodyText:doe~0.6 id:doe~0.6 nodeName:doe~0.6 updateDate:doe~0.6 writerName:doe~0.6 path:doe~0.6 nodeTypeAlias:doe~0.6 parentID:doe~0.6) ((+metaTitle:john +metaTitle:doe)^5.0) metaTitle:john~0.6 (firstName:doe~0.6 lastName:doe~0.6 bodyText:doe~0.6 id:doe~0.6 nodeName:doe~0.6 updateDate:doe~0.6 writerName:doe~0.6 path:doe~0.6 nodeTypeAlias:doe~0.6 parentID:doe~0.6) ((+metaDescription:john +metaDescription:doe)^5.0) metaDescription:john~0.6 (firstName:doe~0.6 lastName:doe~0.6 bodyText:doe~0.6 id:doe~0.6 nodeName:doe~0.6 updateDate:doe~0.6 writerName:doe~0.6 path:doe~0.6 nodeTypeAlias:doe~0.6 parentID:doe~0.6)) }
I notice this is only happening when my search term includes a space. Any ideas?
I think I solved it. I'm new to all this, so I'm not exactly sure why, but wrapping my search terms within parathensis seemed to fix it.
Here's a simplified version of what it was before:
nodeName:(+John +Doe)^5 nodeName:John~0.5 Doe~0.5
Which caused every field in the index to be searched
Changing to this fixed it:
nodeName:(+John +Doe)^5 nodeName:(John~0.5 Doe~0.5)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Lucene RawQuery() searching every field in index
So I have some code that generates a string to use in a Lucene RawQuery. Here's an example of my string:
The query that is generated after passing it into RawQuery is search ever field in the Examine Index.
I notice this is only happening when my search term includes a space. Any ideas?
I think I solved it. I'm new to all this, so I'm not exactly sure why, but wrapping my search terms within parathensis seemed to fix it.
Here's a simplified version of what it was before:
Which caused every field in the index to be searched
Changing to this fixed it:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.