search for *:* and see if the index indeed has the documents .
Once you ensure the docs are there go through the lucene query syntax
and check your query

On Tue, Nov 11, 2008 at 10:07 AM, Kevin Penny <[EMAIL PROTECTED]> wrote:
> Ok so I executed a:
> solr/dataimport?command=full-import
> then I checked here:
> solr/dataimport
>
> I get a good xml message (figure 1.1) showing me that 125 records have been 
> indexed (good) and I know one of them contains the word 'job'.
>
> I sould get results from this query string then right (figure 1.0 is my 
> result - 0 records found)?
> solr/select?q=job
>
>
> figure 1.0
> <response>
> −
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">0</int>
> −
> <lst name="params">
> <str name="q">job</str>
> </lst>
> </lst>
> <result name="response" numFound="0" start="0"/>
> </response>
>
> figure 1.1
> <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">125</str>
> <str name="Total Documents Skipped">0</str>
> <str name="Full Dump Started">2008-11-10 22:33:55</str>
> −
> <str name="">
> Indexing completed. Added/Updated: 125 documents. Deleted 0 documents.
> </str>
> <str name="Committed">2008-11-10 22:34:00</str>
> <str name="Optimized">2008-11-10 22:34:00</str>
> <str name="Time taken ">0:0:5.79</str>
> </lst>
> −
> <str name="WARNING">
> This response format is experimental.  It is likely to change in the future.
> </str>
> </response>
>
> Kevin
>
> -----Original Message-----
> From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 10, 2008 10:30 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Newbie Question - getting search results from dataimport request 
> handler
>
> XML is just an intermediete data format Solr internally has no XML
> data. When the data comes out XML is just another representation of
> the same data.
>
> Whether you put in data using XML or DB (SQL) it all goes into the
> same index . Query must be done on that index using the syntax
> http://localhost:8983/solr/select/?q=<your-query-goes-here>
>
> On Tue, Nov 11, 2008 at 9:55 AM, Kevin Penny <[EMAIL PROTECTED]> wrote:
>> Ok - and what would that be? (query interface)
>>
>> I need the URL format that would work in this situation to return data from 
>> my setup.
>>
>> I've gone through the tutorial and used execution strings like:
>> http://localhost:8983/solr/select/?indent=on&q=video&sort=price+desc
>> etc however I'm working with sql data and not xml data.
>>
>> Thanks
>>
>> -----Original Message-----
>> From: Noble Paul നോബിള്‍ नोब्ळ् [mailto:[EMAIL PROTECTED]
>> Sent: Monday, November 10, 2008 10:18 PM
>> To: solr-user@lucene.apache.org
>> Subject: Re: Newbie Question - getting search results from dataimport 
>> request handler
>>
>> you cannot query the DIH. It can only do indexing
>> after indexing you must do the indexing on the regular query interface
>>
>> On Tue, Nov 11, 2008 at 9:45 AM, Kevin Penny <[EMAIL PROTECTED]> wrote:
>>> 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
>>>
>>>
>>>
>>
>>
>>
>> --
>> --Noble Paul
>>
>
>
>
> --
> --Noble Paul
>



-- 
--Noble Paul
  • Newbie Question - gett... Kevin Penny
    • Re: Newbie Questi... Noble Paul നോബിള്‍ नोब्ळ्
      • RE: Newbie Qu... Kevin Penny
        • Re: Newbi... Noble Paul നോബിള്‍ नोब्ळ्
          • RE: N... Kevin Penny
            • ... Noble Paul നോബിള്‍ नोब्ळ्
              • ... Kevin Penny
                • ... Shalin Shekhar Mangar
                • ... Kevin Penny
                • ... Chris Hostetter
                • ... Shalin Shekhar Mangar
                • ... Chris Hostetter
                • ... Noble Paul നോബിള്‍ नोब्ळ्
                • ... Chris Hostetter
                • ... Noble Paul നോബിള്‍ नोब्ळ्
                • ... Norskog, Lance

Reply via email to