You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by KRIS MUSSHORN <mu...@comcast.net> on 2016/08/31 13:15:55 UTC
query issue
SOLR 5.4.1.
Executing query content:ddd on the core below in the solr web interface returns no documents but query content:Dispatches returns doc 1. Why does the first query return no documents?
Doc 1
{
"id":"https://snip/inside/news/dispatches/view.cfm?id=2571",
"url":"https://snip/inside/news/dispatches/view.cfm?id=2571",
"content":"Dispatches - DISPATCH Security, and 508 Notice Powered By Authentication"],
"_version_":1544180960786907136,
"entity_type":"node",
"timestamp":"2016-08-31T12:15:22.165Z"},
Doc 2
{
"id":"epwb95/node/3",
"site":"https://snip/drupaldev/",
"hash":"epwb95",
"entity_id":3,
"entity_type":"node",
"bundle":"page",
"bundle_name":"Basic page",
"ss_language":"und",
"path":"node/3",
"url":"https://snip/drupaldev/me/about",
"path_alias":"me/about",
"label":"About",
"spell":["About",
" About me page testing "],
"content":" About me page testing ",
"teaser":" About me page testing ",
"ss_name":"kmusshorn",
"tos_name":"kmusshorn",
"ss_name_formatted":"kmusshorn",
"tos_name_formatted":"kmusshorn",
"is_uid":6,
"bs_status":true,
"bs_sticky":false,
"bs_promote":false,
"is_tnid":0,
"bs_translate":false,
"ds_created":"2016-08-15T12:54:10Z",
"ds_changed":"2016-08-16T17:31:47Z",
"ds_last_comment_or_change":"2016-08-16T17:31:47Z",
"_version_":1544181596777611264,
"timestamp":"2016-08-31T12:25:28.714Z"},
Doc 3
{
"id":"epwb95/node/10",
"site":"https://snip/drupaldev/",
"hash":"epwb95",
"entity_id":10,
"entity_type":"node",
"bundle":"blog",
"bundle_name":"Blog entry",
"ss_language":"und",
"path":"node/10",
"url":"https://snip/drupaldev/node/10",
"label":"Blogging",
"spell":["Blogging",
" kmusshorn's blog ddddddddddddd "],
"content":" kmusshorn's blog ddddddddddddd ",
"teaser":" kmusshorn's blog ddddddddddddd ",
"ss_name":"kmusshorn",
"tos_name":"kmusshorn",
"ss_name_formatted":"kmusshorn",
"tos_name_formatted":"kmusshorn",
"is_uid":6,
"bs_status":true,
"bs_sticky":false,
"bs_promote":true,
"is_tnid":0,
"bs_translate":false,
"ds_created":"2016-08-16T14:18:13Z",
"ds_changed":"2016-08-16T14:18:13Z",
"ds_last_comment_or_change":"2016-08-16T14:18:13Z",
"_version_":1544181596783902720,
"timestamp":"2016-08-31T12:25:28.714Z"}]
}}
Re: query issue
Posted by Emir Arnautovic <em...@sematext.com>.
Hi Kris,
It is because there is no token 'ddd' in content field. There are tokens
that start with 'ddd', but that is not what you asked for. If you want
'ddd' to match 'ddddddddd' than your query should be content:ddd*
Please take a look at how Solr tokenization works:
https://cwiki.apache.org/confluence/display/solr/Understanding+Analyzers%2C+Tokenizers%2C+and+Filters
Regrads,
Emir
On 31.08.2016 15:15, KRIS MUSSHORN wrote:
> SOLR 5.4.1.
>
>
>
>
> Executing query content:ddd on the core below in the solr web interface returns no documents but query content:Dispatches returns doc 1. Why does the first query return no documents?
>
>
>
>
>
> Doc 1
>
> {
>
> "id":"https://snip/inside/news/dispatches/view.cfm?id=2571",
>
>
>
>
> "url":"https://snip/inside/news/dispatches/view.cfm?id=2571",
>
>
>
>
> "content":"Dispatches - DISPATCH Security, and 508 Notice Powered By Authentication"],
>
>
>
>
> "_version_":1544180960786907136,
>
>
>
>
> "entity_type":"node",
>
>
>
>
> "timestamp":"2016-08-31T12:15:22.165Z"},
> Doc 2
> {
> "id":"epwb95/node/3",
> "site":"https://snip/drupaldev/",
> "hash":"epwb95",
> "entity_id":3,
> "entity_type":"node",
> "bundle":"page",
> "bundle_name":"Basic page",
> "ss_language":"und",
> "path":"node/3",
> "url":"https://snip/drupaldev/me/about",
> "path_alias":"me/about",
> "label":"About",
> "spell":["About",
> " About me page testing "],
> "content":" About me page testing ",
> "teaser":" About me page testing ",
> "ss_name":"kmusshorn",
> "tos_name":"kmusshorn",
> "ss_name_formatted":"kmusshorn",
> "tos_name_formatted":"kmusshorn",
> "is_uid":6,
> "bs_status":true,
> "bs_sticky":false,
> "bs_promote":false,
> "is_tnid":0,
> "bs_translate":false,
> "ds_created":"2016-08-15T12:54:10Z",
> "ds_changed":"2016-08-16T17:31:47Z",
> "ds_last_comment_or_change":"2016-08-16T17:31:47Z",
> "_version_":1544181596777611264,
> "timestamp":"2016-08-31T12:25:28.714Z"},
> Doc 3
> {
> "id":"epwb95/node/10",
> "site":"https://snip/drupaldev/",
> "hash":"epwb95",
> "entity_id":10,
> "entity_type":"node",
> "bundle":"blog",
> "bundle_name":"Blog entry",
> "ss_language":"und",
> "path":"node/10",
> "url":"https://snip/drupaldev/node/10",
> "label":"Blogging",
> "spell":["Blogging",
> " kmusshorn's blog ddddddddddddd "],
> "content":" kmusshorn's blog ddddddddddddd ",
> "teaser":" kmusshorn's blog ddddddddddddd ",
> "ss_name":"kmusshorn",
> "tos_name":"kmusshorn",
> "ss_name_formatted":"kmusshorn",
> "tos_name_formatted":"kmusshorn",
> "is_uid":6,
> "bs_status":true,
> "bs_sticky":false,
> "bs_promote":true,
> "is_tnid":0,
> "bs_translate":false,
> "ds_created":"2016-08-16T14:18:13Z",
> "ds_changed":"2016-08-16T14:18:13Z",
> "ds_last_comment_or_change":"2016-08-16T14:18:13Z",
> "_version_":1544181596783902720,
> "timestamp":"2016-08-31T12:25:28.714Z"}]
> }}
>
--
Monitoring * Alerting * Anomaly Detection * Centralized Log Management
Solr & Elasticsearch Support * http://sematext.com/