how to check index's data

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

how to check index's data

James liu-2
lucene's index can be checked by lukeall.jar;

how to check solr's index?
Reply | Threaded
Open this post in threaded view
|

Re: how to check index's data

Mike Klaas
On 9/16/06, James liu <[hidden email]> wrote:
> lucene's index can be checked by lukeall.jar;
>
> how to check solr's index?

Solr's index is a lucene index.  It's location is specified by the
<dataDir> directive in solrconfig.xml.

-Mike
Reply | Threaded
Open this post in threaded view
|

Re: how to check index's data

James liu-2
i think you misunderstand.

i wanna check indexed data,,,not how to index.

because my testxml seems to be indexed ,,,but i can't find it by
http://localhost:8080/solr/admin

2006/9/17, Mike Klaas <[hidden email]>:

>
> On 9/16/06, James liu <[hidden email]> wrote:
> > lucene's index can be checked by lukeall.jar;
> >
> > how to check solr's index?
>
> Solr's index is a lucene index.  It's location is specified by the
> <dataDir> directive in solrconfig.xml.
>
> -Mike
>
Reply | Threaded
Open this post in threaded view
|

Re: how to check index's data

Chris Hostetter-3
:
: i think you misunderstand.
:
: i wanna check indexed data,,,not how to index.

I think mike's point is that a solr index *is* a lucene index, so you can
point luke at it just like you're use to if you've used lucene.

: because my testxml seems to be indexed ,,,but i can't find it by
: http://localhost:8080/solr/admin

off the top of my head: did you remember to do a commit after you added
the docs?

: > > lucene's index can be checked by lukeall.jar;
: > >
: > > how to check solr's index?
: >
: > Solr's index is a lucene index.  It's location is specified by the
: > <dataDir> directive in solrconfig.xml.



-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: how to check index's data

James liu-2
1: my lucene index will have _1.cfs,deletable,segments,,,,and solr just only
segments,,,am i wrong? luke can't open solr's index,and can open lucene's
index.

2:   i m sure commit after adddocs.



2006/9/17, Chris Hostetter <[hidden email]>:

>
> :
> : i think you misunderstand.
> :
> : i wanna check indexed data,,,not how to index.
>
> I think mike's point is that a solr index *is* a lucene index, so you can
> point luke at it just like you're use to if you've used lucene.
>
> : because my testxml seems to be indexed ,,,but i can't find it by
> : http://localhost:8080/solr/admin
>
> off the top of my head: did you remember to do a commit after you added
> the docs?
>
> : > > lucene's index can be checked by lukeall.jar;
> : > >
> : > > how to check solr's index?
> : >
> : > Solr's index is a lucene index.  It's location is specified by the
> : > <dataDir> directive in solrconfig.xml.
>
>
>
> -Hoss
>
>
Reply | Threaded
Open this post in threaded view
|

Re: how to check index's data

James liu-2
i just modify addIndex,,,,

if i index data,i can see "updated"...



function addIndex($resultarray) {
$dom_string = '<add>
  <doc>
      <field name="id">111</field>
    <field name="pname">jl</field>
    <field name="pdepart">jldepart</field>
    <field name="pcompany">jlcompany</field>
  </doc>
  <doc>
      <field name="id">112</field>
    <field name="pname">ben</field>
    <field name="pdepart">bendepart</field>
    <field name="pcompany">bencompany</field>
  </doc>
  <doc>
      <field name="id">113</field>
    <field name="pname">gf</field>
    <field name="pdepart">gfdepart</field>
    <field name="pcompany">gfcompany</field>
  </doc>
</add>';
                if ($dom_string) {
                        $ok = $this->sendUpdate($dom_string);
                        echo 'updated<br>';
                } else {
                        echo "Error with xml document";
                        print_r($resultarray);
                }
                return $ok;
        }
Reply | Threaded
Open this post in threaded view
|

Re: how to check index's data

James liu-2
I find solrphp is problem.

i use post.sh,,it can index data and i can use luke
Reply | Threaded
Open this post in threaded view
|

Re: how to check index's data

Chris Hostetter-3

: I find solrphp is problem.
:
: i use post.sh£¬£¬it can index data and i can use luke

post.sh does a commit automatically after sending docs, i don't know much
about PHP but doing a quick grep of http://wiki.apache.org/solr/SolrUpdate
i don't see anywhere in the addIndex method you mentioned that it does a
commit ... i tink you are expected to call the sendCommit function
yourself.

A quick way to check if any docs have been added to your index is to look
at the statistics page...

http://localhost:8983/solr/admin/stats.jsp

...if any documents have ever been added you should see a non-zero value
for "maxDocs" in the "CORE" section ... if there are currently some
non-deleted docs you should see a non-zero value for "numDocs" as well.

the other important section to look at is the "UPDATE HANDLERS" section
... if that "commits" count is 0 then your client code has never sent a
commit - the docsPending and deletesPending numbers will tell you how many
commands it has recieved that it hasn't done yet because it's waiting for
a commit.



-Hoss