lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Penny <kpe...@jobs2web.com>
Subject Newbie Question - getting search results from dataimport request handler
Date Tue, 11 Nov 2008 04:15:15 GMT
My Question is: what is the format of a search that will return data?
i.e. /solr/select?q=developer&qt=dataimport (won’t work) nor will /solr/dataimport?q=developer
(won’t work)
“HTTP ERROR: 404
NOT_FOUND
RequestURI=/solr/dataimport“

I have created a ‘dataimport’ set that contains data from a sql db.

I can view meta data from this url: /solr/dataimport
<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
</lst>
−
<lst name="initArgs">
−
<lst name="defaults">
<str name="config">data-config.xml</str>
</lst>
</lst>
<str name="status">idle</str>
<str name="importResponse"/>
−
<lst name="statusMessages">
<str name="Total Requests made to DataSource">1</str>
<str name="Total Rows Fetched">10</str>
<str name="Total Documents Skipped">0</str>
<str name="Full Dump Started">2008-11-10 21:51:40</str>
<str name="Time taken ">0:0:4.594</str>
</lst>
−
<str name="WARNING">
This response format is experimental.  It is likely to change in the future.
</str>
</response>

I can verify that the data is there by going through /solr/admin/dataimport.jsp and doing
‘verbose’ true and debug now.
It shows me the xml data set on the right as such:

<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">4594</int>
</lst>
−
<lst name="initArgs">
−
<lst name="defaults">
<str name="config">data-config.xml</str>
</lst>
</lst>
<str name="command">full-import</str>
<str name="mode">debug</str>
−
<arr name="documents">
−
<arr>
−
<arr>
<int>87133</int>
</arr>
</arr>
−
<arr>
−
<arr>
<int>87134</int>
</arr>
</arr>
−
<arr>
−
<arr>
<int>87135</int>
</arr>
</arr>
−
<arr>
−
<arr>
<int>87136</int>
</arr>
</arr>
−
<arr>
−
<arr>
<int>87137</int>
</arr>
</arr>
−
<arr>
−
<arr>
<int>87138</int>
</arr>
</arr>
−
<arr>
−
<arr>
<int>87139</int>
</arr>
</arr>
−
<arr>
−
<arr>
<int>87140</int>
</arr>
</arr>
−
<arr>
−
<arr>
<int>87141</int>
</arr>
</arr>
−
<arr>
−
<arr>
<int>87142</int>
</arr>
</arr>
</arr>
−
<lst name="verbose-output">
−
<lst name="entity:item">
−
<lst name="document#1">
−
<str name="query">
SELECT  j.id      , j.title      ,  FROM      dbo.jobs j WITH (NOLOCK)      LEFT  WHERE j.siteid
= 46 and j.active = 1
</str>
<str name="time-taken">0:0:4.578</str>
<str>----------- row #1-------------</str>
<str name="zip"/>
<str name="urltitle">Operations Software Developer Job</str>
<str name="altlocation">SAN ANTONIO, TX, 78229</str>
<str name="alttitle">Ope…


Here is my solconfig.xml
…
<requestHandler name="dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
    <lst name="defaults">
      <str name="config">data-config.xml</str>
    </lst>
  </requestHandler>
…
Data-config.xml is in the same dir as solconfig.xml

My data-config.xml is like any other:
<dataConfig>
    <dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://xxxxxxxx:1433;databaseName=xxxxx" user="xxxxx" password="xxxxx" />
    <document name="jobs">
            <entity name="item" pk="id" query="SELECT  j.id
                                                            , j.title
                                                            …
                                                FROM
                                                            dbo.jobs …
                                                WHERE j.siteid = 46 and j.active = 1"
                deltaQuery="select id from dbo.jobs where lastmodified > '${dataimporter.last_index_time}'">

        </entity>
    </document>
</dataConfig>

I’m using win xp with apache – and jetty + solr 1.3.0

Thanks


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message