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 PeterKerk <ve...@hotmail.com> on 2010/08/04 21:42:04 UTC

Indexing boolean value

Im trying to index a boolean location, but for some reason it does not show
up in my indexed data.

data-config.xml

        <entity name="location" query="select * from locations">
            <field name="id" column="ID" />
            <field name="title" column="TITLE" />
            <field name="city" column="CITY" />
	    <field name="official" column="OFFICIALLOCATION" />

OFFICIALLOCATION is a MSSQL database field of type 'bit'


schema.xml

<field name="official" type="boolean" indexed="true" stored="true"/>
<copyField source="official" dest="text" />

(im not sure why I would use <copyField, also tried it without that line,
but still without luck)
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-boolean-value-tp1023708p1023708.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Indexing boolean value

Posted by Lance Norskog <go...@gmail.com>.
It is possible that the DIH JDBC interface does not handle the MySQL 'bit' type.

In general, it is easiest to make a DB view for your DIH query. It
lets you see what the DHH gets, and the DIH syntax is easier.. You can
throw in a translator function there to turn a 'bit' into an integer.

On Thu, Sep 2, 2010 at 1:00 AM, kirsty <ki...@gmail.com> wrote:
>
>
> Michael Griffiths wrote:
>>
>> Copyfield copies the field so you can have multiple versions. Useful to
>> dump all fields into one "super" field you can search on, for perf
>> reasons.
>>
>> If the column isn't being indexed, I'd suggest the problem is in DIH. No
>> suggestions as to why, I'm afraid.
>>
>> -----Original Message-----
>> From: PeterKerk [mailto:vetteparty@hotmail.com]
>> Sent: Wednesday, August 04, 2010 4:22 PM
>> To: solr-user@lucene.apache.org
>> Subject: RE: Indexing boolean value
>>
>>
>> Hi,
>>
>> I tried that already, so that would make this:
>>
>> <field name="official" type="integer" indexed="true" stored="true"/>
>> <copyField source="official" dest="text" />
>>
>> (still not sure what copyField does though)
>>
>> But even that wont work. I also dont see the officallocation columns
>> indexed in the documents:
>> http://localhost:8983/solr/db/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Indexing-boolean-value-tp1023708p1023811.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
>>
>>
>
>
> Hi there,
> Has anyone managed to figure this out? I am hitting the same problem.
>
> Thanks
> Kirsty
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Indexing-boolean-value-tp1023708p1405001.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Lance Norskog
goksron@gmail.com

RE: Indexing boolean value

Posted by kirsty <ki...@gmail.com>.

Michael Griffiths wrote:
> 
> Copyfield copies the field so you can have multiple versions. Useful to
> dump all fields into one "super" field you can search on, for perf
> reasons.
> 
> If the column isn't being indexed, I'd suggest the problem is in DIH. No
> suggestions as to why, I'm afraid.
> 
> -----Original Message-----
> From: PeterKerk [mailto:vetteparty@hotmail.com] 
> Sent: Wednesday, August 04, 2010 4:22 PM
> To: solr-user@lucene.apache.org
> Subject: RE: Indexing boolean value
> 
> 
> Hi,
> 
> I tried that already, so that would make this:
> 
> <field name="official" type="integer" indexed="true" stored="true"/>
> <copyField source="official" dest="text" />
> 
> (still not sure what copyField does though)
> 
> But even that wont work. I also dont see the officallocation columns
> indexed in the documents:
> http://localhost:8983/solr/db/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on
> 
> 
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Indexing-boolean-value-tp1023708p1023811.html
> Sent from the Solr - User mailing list archive at Nabble.com.
> 
> 
> 
> 


Hi there,
Has anyone managed to figure this out? I am hitting the same problem.

Thanks
Kirsty
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-boolean-value-tp1023708p1405001.html
Sent from the Solr - User mailing list archive at Nabble.com.

RE: Indexing boolean value

Posted by Michael Griffiths <mg...@am-ind.com>.
Copyfield copies the field so you can have multiple versions. Useful to dump all fields into one "super" field you can search on, for perf reasons.

If the column isn't being indexed, I'd suggest the problem is in DIH. No suggestions as to why, I'm afraid.

-----Original Message-----
From: PeterKerk [mailto:vetteparty@hotmail.com] 
Sent: Wednesday, August 04, 2010 4:22 PM
To: solr-user@lucene.apache.org
Subject: RE: Indexing boolean value


Hi,

I tried that already, so that would make this:

<field name="official" type="integer" indexed="true" stored="true"/> <copyField source="official" dest="text" />

(still not sure what copyField does though)

But even that wont work. I also dont see the officallocation columns indexed in the documents:
http://localhost:8983/solr/db/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on


--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-boolean-value-tp1023708p1023811.html
Sent from the Solr - User mailing list archive at Nabble.com.



RE: Indexing boolean value

Posted by PeterKerk <ve...@hotmail.com>.
Hi,

I tried that already, so that would make this:

<field name="official" type="integer" indexed="true" stored="true"/>
<copyField source="official" dest="text" />

(still not sure what copyField does though)

But even that wont work. I also dont see the officallocation columns indexed
in the documents:
http://localhost:8983/solr/db/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on


-- 
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-boolean-value-tp1023708p1023811.html
Sent from the Solr - User mailing list archive at Nabble.com.

RE: Indexing boolean value

Posted by Michael Griffiths <mg...@am-ind.com>.
I could be wrong, but I thought bit was an integer. Try changing fieldtype to integer.

-----Original Message-----
From: PeterKerk [mailto:vetteparty@hotmail.com] 
Sent: Wednesday, August 04, 2010 3:42 PM
To: solr-user@lucene.apache.org
Subject: Indexing boolean value


Im trying to index a boolean location, but for some reason it does not show up in my indexed data.

data-config.xml

        <entity name="location" query="select * from locations">
            <field name="id" column="ID" />
            <field name="title" column="TITLE" />
            <field name="city" column="CITY" />
	    <field name="official" column="OFFICIALLOCATION" />

OFFICIALLOCATION is a MSSQL database field of type 'bit'


schema.xml

<field name="official" type="boolean" indexed="true" stored="true"/> <copyField source="official" dest="text" />

(im not sure why I would use <copyField, also tried it without that line, but still without luck)
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-boolean-value-tp1023708p1023708.html
Sent from the Solr - User mailing list archive at Nabble.com.