|
I have a schema this in my schema.xml
<field name="MEDIA" type="text" indexed="true" stored="true" multiValued="true" default=""/>
and I would like to query the documents where MEDIA is not equal to the default value. We are trying to optimize the query MEDIA:* since it is really slow. We would like to get all the documents where MEDIA is not null. So, we thought that -MEDIA:'' will work but it doesn't. I am still getting documents where MEDIA is the default value. For example:
"response":{"numFound":4,"start":0,"docs":[
{
"MEDIA":["1||5fbc299118ea6a63234ca9f3"]},
{
"MEDIA":["1||5f064502850a3d36157f2d67",
"2||5f0645067d833c0b1a3b84a5",
"3||5f06450a89867865a45435d5",
"4||5f0645116bf73a70260ec06a",
"5||5f064515b747a27e8a344e55",
"6||5f0645193632d4209b5fc768",
"7||5f0645205feb502e0a46ee23",
"8||5f064524a07b0c7ecc60a138",
"9||5f0645289b474230e3562e0f",
"10||5f06452dd092b10dbe3edf93",
"11||5f064531dae8a502a64a6e2d",
"12||5f064534d1d70b1c331325bd",
"13||5f064538ad645314c81f9aba",
"14||5f06453bdc3efe570009dec4",
"15||5f06453fe51d312926157a54",
"16||5f064543e085b15df1464c24",
"17||5f06454769720415f22cfa85",
"18||5f06454b9eadcc440448ba54",
"19||5f0645513b9db34063796de0",
"20||5f0645556e26eb598b78b2b5",
"21||5f06455a13411065bc0f4cd6",
"22||5f06455e756328057a476348",
"23||5f06456241009a3eb4356676",
"24||5f0645671e4a0470a4557bc1",
"25||5f06456f792b3b5067581615",
"26||5f0645762aa72e10c471cab5",
"27||5f064579e085b15df1464c28",
"28||5f06457d41a6d14c006f8f13",
"29||5f064583e9d7594f645931fe",
"30||5f06458735d8475687658cd8",
"31||5f06458a1e4a0470a4557bc4",
"32||5f06458ee5e848155f0bfcf0",
"33||5f06459167b0807cbd12ccd3"]},
{
"MEDIA":[""]},
{
"MEDIA":[""]}]
}}
I would like to get the first two documents without doing MEDIA:* for optimization.
Thanks.
|