Re: query action with wrong result size zero

2016-05-10 Thread Mikhail Khludnev
Usually such issues are troubleshooted with: Solr admin: schema browser and
analysis. Also, you might need to check debugQuery=true output and perhaps
use explainOther param.
05 мая 2016 г. 18:58 пользователь "mixiangliu" <852262...@qq.com> написал:


i found a strange thing  with solr query,when i set the value of query
field like "brand:amd",the  size of query result is zero,but the real data
is not zero,can  some body tell me why,thank you very much!!
my english is not very good,wish some body understand my words!


Re: query action with wrong result size zero

2016-05-10 Thread xiangliumi
Hi,Erick

thank you very much, i will do more try following your words.


thanks
Max Mi

Sent using CloudMagic Email 
[https://cloudmagic.com/k/d/mailapp?ct=pa=8.4.52=4.4.2=email_footer_2]
 On Fri, May 06, 2016 at 11:39 PM, Erick < erickerick...@gmail.com 
[erickerick...@gmail.com] > wrote:
bq: does this means that different kinds of docs can not be put into
the same solr core

You can certainly put different kinds of docs in the same core,
you just have to search them appropriately, something like
q=field1:value OR field2:value

Say doc1 had "value" in field1 (but did not have field2)
and doc2 had "value" in field2 (but did not have field1)

Then the above query would return both docs.

However, this may have surprising results since presumably
the different "types" of docs represent very different things.
Let's say you have "people" and "places" docs. Ogden is a
surname, but there is also a city in Utah called "Ogden".
A search like above might return both and if the user expected
to be searching places they'd be surprised to see a person.

So, to sum up there's no restriction on having different types
of docs with different fields in Solr, you just have to search
them appropriately (and so the users get what they expect).

Very often, people will put a "type" field in the doc and restrict
what kinds of docs are returned with an fq clause (fq=type:people
in the above example for instance) when appropriate.

Best,
Erick

On Thu, May 5, 2016 at 10:58 PM, 梦在远方 <chinaman...@qq.com> wrote:
> thank you ,Jay Potharaju
>
>
> I got a discover, in the same one solr core , i put two kinds of docs, which 
> means that they does not have the same fields, does this means that different 
> kinds of docs can not be put into the same solr core?
>
>
> thanks!
> 
> max mi
>
>
>
>
> -- 原始邮件 --
> 发件人: "Erick Erickson";<erickerick...@gmail.com>;
> 发送时间: 2016年5月6日(星期五) 中午12:14
> 收件人: "solr-user"<solr-user@lucene.apache.org>;
>
> 主题: Re: query action with wrong result size zero
>
>
>
> Please show us:
> 1> a sample doc that you expect to be returned
> 2> the results of adding '=query' to the URL
> 3> the schema definition for the field you're querying against.
>
> It is likely that your query isn't quite what you think it is, is going
> against a different field than you think or your schema isn't
> quite doing what you think...
>
> On Thu, May 5, 2016 at 9:40 AM, Jay Potharaju <jspothar...@gmail.com> wrote:
>> Can you check if the field you are searching on is case sensitive? You can
>> quickly test it by copying the exact contents of the brand field into your
>> query and comparing it against the query you have posted above.
>>
>> On Thu, May 5, 2016 at 8:57 AM, mixiangliu <852262...@qq.com> wrote:
>>
>>>
>>> i found a strange thing with solr query,when i set the value of query
>>> field like "brand:amd",the size of query result is zero,but the real data
>>> is not zero,can some body tell me why,thank you very much!!
>>> my english is not very good,wish some body understand my words!
>>>
>>
>>
>>
>> --
>> Thanks
>> Jay Potharaju

Re: query action with wrong result size zero

2016-05-06 Thread Erick Erickson
bq: does this means that different kinds of docs can not be put into
the same solr core

You can certainly put different kinds of docs in the same core,
you just have to search them appropriately, something like
q=field1:value OR field2:value

Say doc1 had "value" in field1 (but did  not have field2)
and doc2 had "value" in field2 (but did not have field1)

Then the above query would return both docs.

However, this may have surprising results since presumably
the different "types" of docs represent very different things.
Let's say you have "people" and "places" docs. Ogden is a
surname, but there is also a city in Utah called "Ogden".
A search like above might return both and if the user expected
to be searching places they'd be surprised to see a person.

So, to sum up there's no restriction on having different types
of docs with different fields in Solr, you just have to search
them appropriately (and so the users get what they expect).

Very often, people will put a "type" field in the doc and restrict
what kinds of docs are returned with an fq clause (fq=type:people
in the above example for instance) when appropriate.

Best,
Erick

On Thu, May 5, 2016 at 10:58 PM, 梦在远方 <chinaman...@qq.com> wrote:
> thank you ,Jay Potharaju
>
>
> I got a discover, in the same one solr core , i put two kinds of docs, which 
> means that they does not have the same fields, does this means that different 
> kinds of docs can not be put into the same solr core?
>
>
> thanks!
> 
> max mi
>
>
>
>
> -- 原始邮件 --
> 发件人: "Erick Erickson";<erickerick...@gmail.com>;
> 发送时间: 2016年5月6日(星期五) 中午12:14
> 收件人: "solr-user"<solr-user@lucene.apache.org>;
>
> 主题: Re: query action with wrong result size zero
>
>
>
> Please show us:
> 1> a sample doc that you expect to be returned
> 2> the results of adding '=query' to the URL
> 3> the schema definition for the field you're querying against.
>
> It is likely that your query isn't quite what you think it is, is going
> against a different field than you think or your schema isn't
> quite doing what you think...
>
> On Thu, May 5, 2016 at 9:40 AM, Jay Potharaju <jspothar...@gmail.com> wrote:
>> Can you check if the field you are searching on is case sensitive? You can
>> quickly test it by copying the exact contents of the brand field into your
>> query and comparing it against the query you have posted above.
>>
>> On Thu, May 5, 2016 at 8:57 AM, mixiangliu <852262...@qq.com> wrote:
>>
>>>
>>> i found a strange thing  with solr query,when i set the value of query
>>> field like "brand:amd",the  size of query result is zero,but the real data
>>> is not zero,can  some body tell me why,thank you very much!!
>>> my english is not very good,wish some body understand my words!
>>>
>>
>>
>>
>> --
>> Thanks
>> Jay Potharaju


?????? query action with wrong result size zero

2016-05-05 Thread ????????
thank you ,Jay Potharaju


I got a discover, in the same one solr core , i put two kinds of docs, which 
means that they does not have the same fields, does this means that different 
kinds of docs can not be put into the same solr core?


thanks!

max mi




--  --
??: "Erick Erickson";<erickerick...@gmail.com>;
: 2016??5??6??(??) 12:14
??: "solr-user"<solr-user@lucene.apache.org>; 

????: Re: query action with wrong result size zero



Please show us:
1> a sample doc that you expect to be returned
2> the results of adding '=query' to the URL
3> the schema definition for the field you're querying against.

It is likely that your query isn't quite what you think it is, is going
against a different field than you think or your schema isn't
quite doing what you think...

On Thu, May 5, 2016 at 9:40 AM, Jay Potharaju <jspothar...@gmail.com> wrote:
> Can you check if the field you are searching on is case sensitive? You can
> quickly test it by copying the exact contents of the brand field into your
> query and comparing it against the query you have posted above.
>
> On Thu, May 5, 2016 at 8:57 AM, mixiangliu <852262...@qq.com> wrote:
>
>>
>> i found a strange thing  with solr query??when i set the value of query
>> field like "brand:amd"??the  size of query result is zero,but the real data
>> is not zero??can  some body tell me why??thank you very much
>> my english is not very good??wish some body understand my words!
>>
>
>
>
> --
> Thanks
> Jay Potharaju

Re: query action with wrong result size zero

2016-05-05 Thread Erick Erickson
Please show us:
1> a sample doc that you expect to be returned
2> the results of adding '=query' to the URL
3> the schema definition for the field you're querying against.

It is likely that your query isn't quite what you think it is, is going
against a different field than you think or your schema isn't
quite doing what you think...

On Thu, May 5, 2016 at 9:40 AM, Jay Potharaju  wrote:
> Can you check if the field you are searching on is case sensitive? You can
> quickly test it by copying the exact contents of the brand field into your
> query and comparing it against the query you have posted above.
>
> On Thu, May 5, 2016 at 8:57 AM, mixiangliu <852262...@qq.com> wrote:
>
>>
>> i found a strange thing  with solr query,when i set the value of query
>> field like "brand:amd",the  size of query result is zero,but the real data
>> is not zero,can  some body tell me why,thank you very much!!
>> my english is not very good,wish some body understand my words!
>>
>
>
>
> --
> Thanks
> Jay Potharaju


Re: query action with wrong result size zero

2016-05-05 Thread Jay Potharaju
Can you check if the field you are searching on is case sensitive? You can
quickly test it by copying the exact contents of the brand field into your
query and comparing it against the query you have posted above.

On Thu, May 5, 2016 at 8:57 AM, mixiangliu <852262...@qq.com> wrote:

>
> i found a strange thing  with solr query,when i set the value of query
> field like "brand:amd",the  size of query result is zero,but the real data
> is not zero,can  some body tell me why,thank you very much!!
> my english is not very good,wish some body understand my words!
>



-- 
Thanks
Jay Potharaju


query action with wrong result size zero

2016-05-05 Thread mixiangliu

i found a strange thing  with solr query,when i set the value of query field 
like "brand:amd",the  size of query result is zero,but the real data is not 
zero,can  some body tell me why,thank you very much!!
my english is not very good,wish some body understand my words!