I was able to let Solr pick up the column names. But if you want to explicitly state them try this query:
SQL> SELECT '<field column="' || column_name || '" name="' || LOWER (column_name) || '" />' 2 FROM user_tab_cols 3 WHERE table_name = 'QUEST_SL_TEMP_EXPLAIN1'; <field column="STATEMENT_ID" name="statement_id" /> <field column="PLAN_ID" name="plan_id" /> <field column="TIMESTAMP" name="timestamp" /> <field column="REMARKS" name="remarks" /> <field column="OPERATION" name="operation" /> <field column="OPTIONS" name="options" /> <field column="OBJECT_NODE" name="object_node" /> <field column="OBJECT_OWNER" name="object_owner" /> <field column="OBJECT_NAME" name="object_name" /> <field column="OBJECT_ALIAS" name="object_alias" /> -----Original Message----- From: caman [mailto:aboxfortheotherst...@gmail.com] Sent: Tuesday, February 02, 2010 12:35 PM To: solr-user@lucene.apache.org Subject: Re: Indexing an oracle warehouse table Anyone please? caman wrote: > > Hello all, > > hope someone can point me to right direction. I am trying to index an > oracle warehouse table(TableA) with 850 columns. Out of the structure > about 800 fields are CLOBs and are good candidate to enable full-text > searching. Also have few columns which has relational link to other > tables. I am clean on how to create a root entity and then pull data from > other relational link as child entities. Most columns in TableA are named > as field1,field2...field800. > Now my question is how to organize the schema efficiently: > First option: > if my query is 'select * from TableA', Do I define <field name="attr1" > column="FIELD1" /> for each of those 800 columns? Seems cumbersome. May > be can write a script to generate XML instead of handwriting both in > data-config.xml and schema.xml. > OR > Dont define any <field name="attr1" column="FIELD1" /> so that column in > SOLR will be same as in the database table. But questions are 1)How do I > define unique field in this scenario? 2) How to copy all the text fields > to a common field for easy searching? > > Any helpful is appreciated. Please feel free to suggest any alternative > way. > > Thanks > > > > > > -- View this message in context: http://old.nabble.com/Indexing-an-oracle-warehouse-table-tp27414263p2742 4327.html Sent from the Solr - User mailing list archive at Nabble.com.