solr/document/select not available

2013-09-15 Thread Nutan
I get this error : solr/select not available.I am using two cores document
and contract.Solrconfig.xml of document core is :



  LUCENE_42
 ${solr.collection1.data.dir:}
/requestDispatcher>


  
  

 
   explicit 
   20
   *
   2.1
 

 
  


last_modified
contents
true
ignored_


   
  
*:*
  


I have defined standard request handler but still why do i get this error?




--
View this message in context: 
http://lucene.472066.n3.nabble.com/solr-document-select-not-available-tp4090171.html
Sent from the Solr - User mailing list archive at Nabble.com.


searching within documents

2013-09-15 Thread Nutan
this is my schema.xml :

 










 











id


this is the document i want to search through contents:

8

nutan shinde

best book for solr
solr,lucene,apache tika

solr,lucene is used for search based service.Google works uses web
crawler.Lucene can implement web crawler

solr enterprise search server
00123467889767

But when i fire this query :

http://localhost:8080/solr/select?q=co…

I get 0 documents found.Document is successfully indexed.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/searching-within-documents-tp4090173.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: searching within documents

2013-09-15 Thread Gora Mohanty
On 15 September 2013 17:20, Nutan  wrote:
>
> this is my schema.xml :

You do not provide nearly enough information for people to
be able to help you.

Is that the entirety of your schema.xml? If so, it is missing
various important bits such as a  and
 directives needed to make a full-text search
work, as you seem to want.

> this is the document i want to search through contents:
> 
> 8
> 
> nutan shinde
> 
> best book for solr
> solr,lucene,apache tika
> 
> solr,lucene is used for search based service.Google works uses web
> crawler.Lucene can implement web crawler
> 
> solr enterprise search server
> 00123467889767 

How are you indexing this document into Solr, and how do you
know that it actually got indexed?

> But when i fire this query :
>
> http://localhost:8080/solr/select?q=co…

Please provide the entire search URL, without which we are
forced to try and guess at what you are trying to do.

Regards,
Gora


Re: searching within documents

2013-09-15 Thread Nutan
That is my whole schema.xml file.
I did not define default and copy field.I am new to solr,never read about
its need for full-text search.Can you please send me any link for
configurations to search within documents.I did follow Solr cookbook 4.
Thanks a lot.


On Sun, Sep 15, 2013 at 5:39 PM, Gora Mohanty-3 [via Lucene] <
ml-node+s472066n4090175...@n3.nabble.com> wrote:

> On 15 September 2013 17:20, Nutan <[hidden 
> email]>
> wrote:
> >
> > this is my schema.xml :
>
> You do not provide nearly enough information for people to
> be able to help you.
>
> Is that the entirety of your schema.xml? If so, it is missing
> various important bits such as a  and
>  directives needed to make a full-text search
> work, as you seem to want.
>
> > this is the document i want to search through contents:
> > 
> > 8
> > 
> > nutan shinde
> > 
> > best book for solr
> > solr,lucene,apache tika
> > 
> > solr,lucene is used for search based service.Google works uses web
> > crawler.Lucene can implement web crawler
> > 
> > solr enterprise search server
> > 00123467889767 > 
>
> How are you indexing this document into Solr, and how do you
> know that it actually got indexed?
>
> > But when i fire this query :
> >
> > http://localhost:8080/solr/select?q=co…
>
> Please provide the entire search URL, without which we are
> forced to try and guess at what you are trying to do.
>
> Regards,
> Gora
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://lucene.472066.n3.nabble.com/searching-within-documents-tp4090173p4090175.html
>  To unsubscribe from searching within documents, click 
> here
> .
> NAML
>




--
View this message in context: 
http://lucene.472066.n3.nabble.com/searching-within-documents-tp4090173p4090176.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Java Client

2013-09-15 Thread Baskar Sikkayan
Hi,
  Thank you very much for your reply.
Let me clearly explain my requirement.

Its a kind of job site.

I have 2 tables that need to be added in solr.

1)  employee ( id, name, skills, location, .)
2) job_postings ( id, name, job title, description, salary, date_posted,
)


Here, there are 2 different kind of searches in my application.

1) employee search by employer
2) job postings search by employee

New row can be added at any time. Also the existing row can be altered at
any time. For example, employee mobile number can be changed at any time
and the solr data has to be updated.

Here there are 2 different searches. So i need to maintain two different
kind of indexes in solr.

The java example says, to add a document, below is the sample code. My
doubt is, how can i add two different kind of search data here.
Should i create a 2 different core for this 2 different searches?

 SolrInputDocument doc = new SolrInputDocument();

  doc.addField("cat", "book");
  doc.addField("id", "book-" + i);
  doc.addField("name", "The Legend of the Hobbit part " + i);
  server.add(doc);
  server.commit();

Thanks,
Baskar.S


On Sun, Sep 15, 2013 at 9:14 AM, Walter Underwood wrote:

> Solr does not have tables, and you can't add an index.
>
> Solr's data model is flat, like a single table with lots of columns. Think
> about creating a view where each row has all the information for one search
> result. It includes everything that is searched (indexed=true in the
> schema) and returned (stored=true in the schema).
>
> wunder
>
> On Sep 14, 2013, at 7:32 PM, Amit Jha wrote:
>
> > Question is not clear to me.  Please be more elaborative in your query.
> Why do u want to store index to DB tables?
> >
> > Rgds
> > AJ
> >
> > On 15-Sep-2013, at 7:20, Baskar Sikkayan  wrote:
> >
> >> How to add index to 3 diff tables from java ...
> >>
> >>
> >> On Sun, Sep 15, 2013 at 6:49 AM, Amit Jha  wrote:
> >>
> >>> Add a field called "source" in schema.xml and value would be your table
> >>> names.
> >>>
> >>>
> >>>
> >>> Rgds
> >>> AJ
> >>>
> >>> On 15-Sep-2013, at 5:38, Baskar Sikkayan  wrote:
> >>>
>  Hi,
>  I am new to Solr and trying to use Solr java client instead of using
> the
>  Data handler.
>  Is there any configuration i need to do for this?
> 
>  I got the following sample code.
> 
>  SolrInputDocument doc = new SolrInputDocument();
> 
> doc.addField("cat", "book");
> doc.addField("id", "book-" + i);
> doc.addField("name", "The Legend of the Hobbit part " + i);
> server.add(doc);
> server.commit();  // periodically flush
> 
>  I am confused here. I am going to index 3 different tables for 3
> >>> different
>  kind of searches. Here i dont have any option to differentiate 3 kind
> of
>  indexes.
>  Am i missing anything here. Could anyone please shed some light here?
> 
>  Thanks,
>  Baskar.S
> >>>
>
>
>
>
>
>


Re: searching within documents

2013-09-15 Thread Erick Erickson
Stop. Back up. Start from the beginning.

Reiterating what Gora was saying, you're
jumping into the middle of your problem.
Start at the beginning.

Have you been able to just do the example
without changing anything else? I.e. are you
sure you have a working installation under
Tomcat? Don't try to skip this step, many Tomcat
issues (and what you've outlined in your other
two posts) are rooted in not having Solr under
Tomcat configured correctly.

Here's what I'd do
1> just use the embedded Jetty to a> set up
a Solr and b> index PDF files. That
eliminates Tomcat config issues and starts
to get you familiar with Solr.

2> when <1> works, install a stock Solr under
Tomcat and get the example to work. Don't change
your schema. Don't try to index PDF files. Don't
do _anything_ else until you have the example
working.

3> When <1> and <2> work, move on to PDF
 files under Tomcat, changing one thing at a time.

Note there are several Wiki pages that give you
detailed info on setting up Solr under Tomcat. Have
you looked at those?

You might review:
http://wiki.apache.org/solr/UsingMailingLists
In particular, consider what it would be like for
_you_ to try to diagnose a problem in a system
you know a lot about with the level of information
you're providing to us.

Best
Erick


On Sun, Sep 15, 2013 at 8:15 AM, Nutan  wrote:

> That is my whole schema.xml file.
> I did not define default and copy field.I am new to solr,never read about
> its need for full-text search.Can you please send me any link for
> configurations to search within documents.I did follow Solr cookbook 4.
> Thanks a lot.
>
>
> On Sun, Sep 15, 2013 at 5:39 PM, Gora Mohanty-3 [via Lucene] <
> ml-node+s472066n4090175...@n3.nabble.com> wrote:
>
> > On 15 September 2013 17:20, Nutan <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=4090175&i=0>>
> > wrote:
> > >
> > > this is my schema.xml :
> >
> > You do not provide nearly enough information for people to
> > be able to help you.
> >
> > Is that the entirety of your schema.xml? If so, it is missing
> > various important bits such as a  and
> >  directives needed to make a full-text search
> > work, as you seem to want.
> >
> > > this is the document i want to search through contents:
> > > 
> > > 8
> > > 
> > > nutan shinde
> > > 
> > > best book for solr
> > > solr,lucene,apache tika
> > > 
> > > solr,lucene is used for search based service.Google works uses web
> > > crawler.Lucene can implement web crawler
> > > 
> > > solr enterprise search server
> > > 00123467889767 > > 
> >
> > How are you indexing this document into Solr, and how do you
> > know that it actually got indexed?
> >
> > > But when i fire this query :
> > >
> > > http://localhost:8080/solr/select?q=co…
> >
> > Please provide the entire search URL, without which we are
> > forced to try and guess at what you are trying to do.
> >
> > Regards,
> > Gora
> >
> >
> > --
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://lucene.472066.n3.nabble.com/searching-within-documents-tp4090173p4090175.html
> >  To unsubscribe from searching within documents, click here<
> http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4090173&code=bnV0YW5zaGluZGUxOTkyQGdtYWlsLmNvbXw0MDkwMTczfC0xMzEzOTU5Mzcx
> >
> > .
> > NAML<
> http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/searching-within-documents-tp4090173p4090176.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Solr Java Client

2013-09-15 Thread Erick Erickson
Listen to Wunder. You really have to switch
gears and think in terms of  searching rather
than database tables.

First, there's no requirement that all documents
have the same fields. There's very little penalty
for this.

Second, you have to get over normalized data.
It's unclear how many employees/records you have,
but unless it's a really big set of records (i.e multiple
tens of millions) you don't have to worry much
about saving space.

BTW, your java example works, but you do NOT
want to commit after every document. Configure
your auto soft and hard commits to do this on a
time-based basis.

So I'd recommend you approach it differently.
Don't get stuck on your current data model. Instead
define the searches you want to make and _then_
decide the appropriate fields in the docs.

But to your question, you can certainly create
two cores. That's a good strategy if there is
little data shared between the two types of users.
It's probably conceptually cleaner as well.

Best,
Erick


On Sun, Sep 15, 2013 at 8:18 AM, Baskar Sikkayan wrote:

> Hi,
>   Thank you very much for your reply.
> Let me clearly explain my requirement.
>
> Its a kind of job site.
>
> I have 2 tables that need to be added in solr.
>
> 1)  employee ( id, name, skills, location, .)
> 2) job_postings ( id, name, job title, description, salary, date_posted,
> )
>
>
> Here, there are 2 different kind of searches in my application.
>
> 1) employee search by employer
> 2) job postings search by employee
>
> New row can be added at any time. Also the existing row can be altered at
> any time. For example, employee mobile number can be changed at any time
> and the solr data has to be updated.
>
> Here there are 2 different searches. So i need to maintain two different
> kind of indexes in solr.
>
> The java example says, to add a document, below is the sample code. My
> doubt is, how can i add two different kind of search data here.
> Should i create a 2 different core for this 2 different searches?
>
>  SolrInputDocument doc = new SolrInputDocument();
>
>   doc.addField("cat", "book");
>   doc.addField("id", "book-" + i);
>   doc.addField("name", "The Legend of the Hobbit part " + i);
>   server.add(doc);
>   server.commit();
>
> Thanks,
> Baskar.S
>
>
> On Sun, Sep 15, 2013 at 9:14 AM, Walter Underwood  >wrote:
>
> > Solr does not have tables, and you can't add an index.
> >
> > Solr's data model is flat, like a single table with lots of columns.
> Think
> > about creating a view where each row has all the information for one
> search
> > result. It includes everything that is searched (indexed=true in the
> > schema) and returned (stored=true in the schema).
> >
> > wunder
> >
> > On Sep 14, 2013, at 7:32 PM, Amit Jha wrote:
> >
> > > Question is not clear to me.  Please be more elaborative in your query.
> > Why do u want to store index to DB tables?
> > >
> > > Rgds
> > > AJ
> > >
> > > On 15-Sep-2013, at 7:20, Baskar Sikkayan  wrote:
> > >
> > >> How to add index to 3 diff tables from java ...
> > >>
> > >>
> > >> On Sun, Sep 15, 2013 at 6:49 AM, Amit Jha 
> wrote:
> > >>
> > >>> Add a field called "source" in schema.xml and value would be your
> table
> > >>> names.
> > >>>
> > >>>
> > >>>
> > >>> Rgds
> > >>> AJ
> > >>>
> > >>> On 15-Sep-2013, at 5:38, Baskar Sikkayan 
> wrote:
> > >>>
> >  Hi,
> >  I am new to Solr and trying to use Solr java client instead of using
> > the
> >  Data handler.
> >  Is there any configuration i need to do for this?
> > 
> >  I got the following sample code.
> > 
> >  SolrInputDocument doc = new SolrInputDocument();
> > 
> > doc.addField("cat", "book");
> > doc.addField("id", "book-" + i);
> > doc.addField("name", "The Legend of the Hobbit part " +
> i);
> > server.add(doc);
> > server.commit();  // periodically flush
> > 
> >  I am confused here. I am going to index 3 different tables for 3
> > >>> different
> >  kind of searches. Here i dont have any option to differentiate 3
> kind
> > of
> >  indexes.
> >  Am i missing anything here. Could anyone please shed some light
> here?
> > 
> >  Thanks,
> >  Baskar.S
> > >>>
> >
> >
> >
> >
> >
> >
>


Re: requested url solr/update/extract not available on this server

2013-09-15 Thread Jack Krupansky

Is /solr/update working?

Check solrconfig to see that /update/extract is configured as in the 
standard Solr example.


Does /solr/update/extract work for you using the standard Solr example?

-- Jack Krupansky

-Original Message- 
From: Nutan

Sent: Sunday, September 15, 2013 2:37 AM
To: solr-user@lucene.apache.org
Subject: requested url solr/update/extract not available on this server

I am working on Solr 4.2 on Windows 7. I am trying to index pdf files.I
referred Solr Cookbook 4. Tomcat is using 8080 port number. I get this
error:requested url solr/update/extract not available on this server
When my curl is :
curl "http://localhost:8080/solr/update/extract?literal.id=1&commit=true"; -F
"myfile=@cookbook.pdf"
There is no entry in log files. Please help.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/requested-url-solr-update-extract-not-available-on-this-server-tp4090153.html
Sent from the Solr - User mailing list archive at Nabble.com. 



Re: Solr Java Client

2013-09-15 Thread Baskar Sikkayan
Hi Erick,
Thanks a lot for your reply. I am still not clear.
I will have 2 different searches.
So, there will be 2 different kind of documents with different fields.

But the example below, gives me a impression that

SolrInputDocument doc = new SolrInputDocument();even there are 2 diff
searches, the data is getting stored in the same

  doc.addField("cat", "book");
  doc.addField("id", "book-" + i);
  doc.addField("name", "The Legend of the Hobbit part " + i);
  server.add(doc);

If i use the same doc, how to diff data for 2 different searches.
Could you explain me clear on this??//


Thanks,
Baskar.S



On Sun, Sep 15, 2013 at 7:57 PM, Erick Erickson wrote:

> Listen to Wunder. You really have to switch
> gears and think in terms of  searching rather
> than database tables.
>
> First, there's no requirement that all documents
> have the same fields. There's very little penalty
> for this.
>
> Second, you have to get over normalized data.
> It's unclear how many employees/records you have,
> but unless it's a really big set of records (i.e multiple
> tens of millions) you don't have to worry much
> about saving space.
>
> BTW, your java example works, but you do NOT
> want to commit after every document. Configure
> your auto soft and hard commits to do this on a
> time-based basis.
>
> So I'd recommend you approach it differently.
> Don't get stuck on your current data model. Instead
> define the searches you want to make and _then_
> decide the appropriate fields in the docs.
>
> But to your question, you can certainly create
> two cores. That's a good strategy if there is
> little data shared between the two types of users.
> It's probably conceptually cleaner as well.
>
> Best,
> Erick
>
>
> On Sun, Sep 15, 2013 at 8:18 AM, Baskar Sikkayan  >wrote:
>
> > Hi,
> >   Thank you very much for your reply.
> > Let me clearly explain my requirement.
> >
> > Its a kind of job site.
> >
> > I have 2 tables that need to be added in solr.
> >
> > 1)  employee ( id, name, skills, location, .)
> > 2) job_postings ( id, name, job title, description, salary, date_posted,
> > )
> >
> >
> > Here, there are 2 different kind of searches in my application.
> >
> > 1) employee search by employer
> > 2) job postings search by employee
> >
> > New row can be added at any time. Also the existing row can be altered at
> > any time. For example, employee mobile number can be changed at any time
> > and the solr data has to be updated.
> >
> > Here there are 2 different searches. So i need to maintain two different
> > kind of indexes in solr.
> >
> > The java example says, to add a document, below is the sample code. My
> > doubt is, how can i add two different kind of search data here.
> > Should i create a 2 different core for this 2 different searches?
> >
> >  SolrInputDocument doc = new SolrInputDocument();
> >
> >   doc.addField("cat", "book");
> >   doc.addField("id", "book-" + i);
> >   doc.addField("name", "The Legend of the Hobbit part " + i);
> >   server.add(doc);
> >   server.commit();
> >
> > Thanks,
> > Baskar.S
> >
> >
> > On Sun, Sep 15, 2013 at 9:14 AM, Walter Underwood  > >wrote:
> >
> > > Solr does not have tables, and you can't add an index.
> > >
> > > Solr's data model is flat, like a single table with lots of columns.
> > Think
> > > about creating a view where each row has all the information for one
> > search
> > > result. It includes everything that is searched (indexed=true in the
> > > schema) and returned (stored=true in the schema).
> > >
> > > wunder
> > >
> > > On Sep 14, 2013, at 7:32 PM, Amit Jha wrote:
> > >
> > > > Question is not clear to me.  Please be more elaborative in your
> query.
> > > Why do u want to store index to DB tables?
> > > >
> > > > Rgds
> > > > AJ
> > > >
> > > > On 15-Sep-2013, at 7:20, Baskar Sikkayan 
> wrote:
> > > >
> > > >> How to add index to 3 diff tables from java ...
> > > >>
> > > >>
> > > >> On Sun, Sep 15, 2013 at 6:49 AM, Amit Jha 
> > wrote:
> > > >>
> > > >>> Add a field called "source" in schema.xml and value would be your
> > table
> > > >>> names.
> > > >>>
> > > >>>
> > > >>>
> > > >>> Rgds
> > > >>> AJ
> > > >>>
> > > >>> On 15-Sep-2013, at 5:38, Baskar Sikkayan 
> > wrote:
> > > >>>
> > >  Hi,
> > >  I am new to Solr and trying to use Solr java client instead of
> using
> > > the
> > >  Data handler.
> > >  Is there any configuration i need to do for this?
> > > 
> > >  I got the following sample code.
> > > 
> > >  SolrInputDocument doc = new SolrInputDocument();
> > > 
> > > doc.addField("cat", "book");
> > > doc.addField("id", "book-" + i);
> > > doc.addField("name", "The Legend of the Hobbit part " +
> > i);
> > > server.add(doc);
> > > server.commit();  // periodically flush
> > > 
> > >  I am confuse

Re: Solr Java Client

2013-09-15 Thread Erick Erickson
Put the data in two different fields. You can also include
a type field and use the fq=type:type1 or fq=type:type2
if you need to distinguish them separately.

Best,
Erick


On Sun, Sep 15, 2013 at 11:00 AM, Baskar Sikkayan wrote:

> Hi Erick,
> Thanks a lot for your reply. I am still not clear.
> I will have 2 different searches.
> So, there will be 2 different kind of documents with different fields.
>
> But the example below, gives me a impression that
>
> SolrInputDocument doc = new SolrInputDocument();even there are 2 diff
> searches, the data is getting stored in the same
>
>   doc.addField("cat", "book");
>   doc.addField("id", "book-" + i);
>   doc.addField("name", "The Legend of the Hobbit part " + i);
>   server.add(doc);
>
> If i use the same doc, how to diff data for 2 different searches.
> Could you explain me clear on this??//
>
>
> Thanks,
> Baskar.S
>
>
>
> On Sun, Sep 15, 2013 at 7:57 PM, Erick Erickson  >wrote:
>
> > Listen to Wunder. You really have to switch
> > gears and think in terms of  searching rather
> > than database tables.
> >
> > First, there's no requirement that all documents
> > have the same fields. There's very little penalty
> > for this.
> >
> > Second, you have to get over normalized data.
> > It's unclear how many employees/records you have,
> > but unless it's a really big set of records (i.e multiple
> > tens of millions) you don't have to worry much
> > about saving space.
> >
> > BTW, your java example works, but you do NOT
> > want to commit after every document. Configure
> > your auto soft and hard commits to do this on a
> > time-based basis.
> >
> > So I'd recommend you approach it differently.
> > Don't get stuck on your current data model. Instead
> > define the searches you want to make and _then_
> > decide the appropriate fields in the docs.
> >
> > But to your question, you can certainly create
> > two cores. That's a good strategy if there is
> > little data shared between the two types of users.
> > It's probably conceptually cleaner as well.
> >
> > Best,
> > Erick
> >
> >
> > On Sun, Sep 15, 2013 at 8:18 AM, Baskar Sikkayan  > >wrote:
> >
> > > Hi,
> > >   Thank you very much for your reply.
> > > Let me clearly explain my requirement.
> > >
> > > Its a kind of job site.
> > >
> > > I have 2 tables that need to be added in solr.
> > >
> > > 1)  employee ( id, name, skills, location, .)
> > > 2) job_postings ( id, name, job title, description, salary,
> date_posted,
> > > )
> > >
> > >
> > > Here, there are 2 different kind of searches in my application.
> > >
> > > 1) employee search by employer
> > > 2) job postings search by employee
> > >
> > > New row can be added at any time. Also the existing row can be altered
> at
> > > any time. For example, employee mobile number can be changed at any
> time
> > > and the solr data has to be updated.
> > >
> > > Here there are 2 different searches. So i need to maintain two
> different
> > > kind of indexes in solr.
> > >
> > > The java example says, to add a document, below is the sample code. My
> > > doubt is, how can i add two different kind of search data here.
> > > Should i create a 2 different core for this 2 different searches?
> > >
> > >  SolrInputDocument doc = new SolrInputDocument();
> > >
> > >   doc.addField("cat", "book");
> > >   doc.addField("id", "book-" + i);
> > >   doc.addField("name", "The Legend of the Hobbit part " +
> i);
> > >   server.add(doc);
> > >   server.commit();
> > >
> > > Thanks,
> > > Baskar.S
> > >
> > >
> > > On Sun, Sep 15, 2013 at 9:14 AM, Walter Underwood <
> wun...@wunderwood.org
> > > >wrote:
> > >
> > > > Solr does not have tables, and you can't add an index.
> > > >
> > > > Solr's data model is flat, like a single table with lots of columns.
> > > Think
> > > > about creating a view where each row has all the information for one
> > > search
> > > > result. It includes everything that is searched (indexed=true in the
> > > > schema) and returned (stored=true in the schema).
> > > >
> > > > wunder
> > > >
> > > > On Sep 14, 2013, at 7:32 PM, Amit Jha wrote:
> > > >
> > > > > Question is not clear to me.  Please be more elaborative in your
> > query.
> > > > Why do u want to store index to DB tables?
> > > > >
> > > > > Rgds
> > > > > AJ
> > > > >
> > > > > On 15-Sep-2013, at 7:20, Baskar Sikkayan 
> > wrote:
> > > > >
> > > > >> How to add index to 3 diff tables from java ...
> > > > >>
> > > > >>
> > > > >> On Sun, Sep 15, 2013 at 6:49 AM, Amit Jha 
> > > wrote:
> > > > >>
> > > > >>> Add a field called "source" in schema.xml and value would be your
> > > table
> > > > >>> names.
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> Rgds
> > > > >>> AJ
> > > > >>>
> > > > >>> On 15-Sep-2013, at 5:38, Baskar Sikkayan 
> > > wrote:
> > > > >>>
> > > >  Hi,
> > > >  I am new to Solr and trying to use Solr java client instead of
> > using

Re: Solr Java Client

2013-09-15 Thread Baskar Sikkayan
Hi,
  Thanks for the reply. I got it now. Is there XSD for schema.xml and
solrconfig.xml?
Also, if i have two different fields with different filed type, how can
differentiate it in SolrJava client.

SolrInputDocument doc = new SolrInputDocument();

  doc.addField("cat", "book");
  doc.addField("id", "book-" + i);
  doc.addField("name", "The Legend of the Hobbit part " + i);
  server.add(doc);

Is there any option here to put the field type?


Thanks,
Baskar.S


On Sun, Sep 15, 2013 at 9:20 PM, Erick Erickson wrote:

> Put the data in two different fields. You can also include
> a type field and use the fq=type:type1 or fq=type:type2
> if you need to distinguish them separately.
>
> Best,
> Erick
>
>
> On Sun, Sep 15, 2013 at 11:00 AM, Baskar Sikkayan  >wrote:
>
> > Hi Erick,
> > Thanks a lot for your reply. I am still not clear.
> > I will have 2 different searches.
> > So, there will be 2 different kind of documents with different fields.
> >
> > But the example below, gives me a impression that
> >
> > SolrInputDocument doc = new SolrInputDocument();even there are 2 diff
> > searches, the data is getting stored in the same
> >
> >   doc.addField("cat", "book");
> >   doc.addField("id", "book-" + i);
> >   doc.addField("name", "The Legend of the Hobbit part " + i);
> >   server.add(doc);
> >
> > If i use the same doc, how to diff data for 2 different searches.
> > Could you explain me clear on this??//
> >
> >
> > Thanks,
> > Baskar.S
> >
> >
> >
> > On Sun, Sep 15, 2013 at 7:57 PM, Erick Erickson  > >wrote:
> >
> > > Listen to Wunder. You really have to switch
> > > gears and think in terms of  searching rather
> > > than database tables.
> > >
> > > First, there's no requirement that all documents
> > > have the same fields. There's very little penalty
> > > for this.
> > >
> > > Second, you have to get over normalized data.
> > > It's unclear how many employees/records you have,
> > > but unless it's a really big set of records (i.e multiple
> > > tens of millions) you don't have to worry much
> > > about saving space.
> > >
> > > BTW, your java example works, but you do NOT
> > > want to commit after every document. Configure
> > > your auto soft and hard commits to do this on a
> > > time-based basis.
> > >
> > > So I'd recommend you approach it differently.
> > > Don't get stuck on your current data model. Instead
> > > define the searches you want to make and _then_
> > > decide the appropriate fields in the docs.
> > >
> > > But to your question, you can certainly create
> > > two cores. That's a good strategy if there is
> > > little data shared between the two types of users.
> > > It's probably conceptually cleaner as well.
> > >
> > > Best,
> > > Erick
> > >
> > >
> > > On Sun, Sep 15, 2013 at 8:18 AM, Baskar Sikkayan  > > >wrote:
> > >
> > > > Hi,
> > > >   Thank you very much for your reply.
> > > > Let me clearly explain my requirement.
> > > >
> > > > Its a kind of job site.
> > > >
> > > > I have 2 tables that need to be added in solr.
> > > >
> > > > 1)  employee ( id, name, skills, location, .)
> > > > 2) job_postings ( id, name, job title, description, salary,
> > date_posted,
> > > > )
> > > >
> > > >
> > > > Here, there are 2 different kind of searches in my application.
> > > >
> > > > 1) employee search by employer
> > > > 2) job postings search by employee
> > > >
> > > > New row can be added at any time. Also the existing row can be
> altered
> > at
> > > > any time. For example, employee mobile number can be changed at any
> > time
> > > > and the solr data has to be updated.
> > > >
> > > > Here there are 2 different searches. So i need to maintain two
> > different
> > > > kind of indexes in solr.
> > > >
> > > > The java example says, to add a document, below is the sample code.
> My
> > > > doubt is, how can i add two different kind of search data here.
> > > > Should i create a 2 different core for this 2 different searches?
> > > >
> > > >  SolrInputDocument doc = new SolrInputDocument();
> > > >
> > > >   doc.addField("cat", "book");
> > > >   doc.addField("id", "book-" + i);
> > > >   doc.addField("name", "The Legend of the Hobbit part " +
> > i);
> > > >   server.add(doc);
> > > >   server.commit();
> > > >
> > > > Thanks,
> > > > Baskar.S
> > > >
> > > >
> > > > On Sun, Sep 15, 2013 at 9:14 AM, Walter Underwood <
> > wun...@wunderwood.org
> > > > >wrote:
> > > >
> > > > > Solr does not have tables, and you can't add an index.
> > > > >
> > > > > Solr's data model is flat, like a single table with lots of
> columns.
> > > > Think
> > > > > about creating a view where each row has all the information for
> one
> > > > search
> > > > > result. It includes everything that is searched (indexed=true in
> the
> > > > > schema) and returned (stored=true in the schema).
> > > > >
> > > > > wunder
> > > > >
>

Re: Solr Java Client

2013-09-15 Thread Gora Mohanty
Dear Baskar,

It seems that you are trying to jump into the
middle, and have a complete understanding
of everything before trying things. This makes
things difficult both for yourself, and for people
trying to help you. Solr can be a little complex
for beginners, so it is best to approach things
a step at a time.

I would suggest:
* Learn how to index from a single database
  table into Solr. The Wiki links that I referred
  you to should help. It might be easiest to get
  started with the DataImportHandler using the
  configuration in example/example-DIH/solr/db/
  in the Solr source code.
* Familiarise yourself with how queries work
  in Solr, in particular how to use the default
  search field, and specific fields.
* Set up SolrJ to index the same table as with
   DIH
* Move on to multiple, possibly related tables
  only once you understand the above.

Regards,
Gora


Re: Solr Java Client

2013-09-15 Thread Gora Mohanty
On 15 September 2013 21:36, Baskar Sikkayan  wrote:
>
> Hi,
>   Thanks for the reply. I got it now. Is there XSD for schema.xml and
> solrconfig.xml?
> Also, if i have two different fields with different filed type, how can
> differentiate it in SolrJava client.
>
> SolrInputDocument doc = new SolrInputDocument();
>
>   doc.addField("cat", "book");
>   doc.addField("id", "book-" + i);
>   doc.addField("name", "The Legend of the Hobbit part " + i);
>   server.add(doc);
>
> Is there any option here to put the field type?
[...]

Field types are defined in schema.xml.

I would again suggest approaching things systematically,
and understanding how the various pieces work.

Regards,
Gora


Re: Solr Patent

2013-09-15 Thread Benson Margulies
I am not a lawyer.

The Apache Software Foundation cannot 'protect Solr developers.'

Patent infringement is a claim made against someone who derived economic
benefit from an invention, not someone who writes code.

The patent clause in the Apache License requires people who contribute code
to grant certain licenses. It does not, and cannot, prevent someone else
from asserting that a user of Apache Solr is infringing on some patent
owned by someone who has never contributed to the project.


Re: Solr Java Client

2013-09-15 Thread Baskar Sikkayan
Hi,
I read few chapters of solr cookbook and hope, I have good basic
understanding of Apache solr and Datahandler.
I was able to modify the field and all. I am able to understand now, what i
was advised to do.

Have a  question now.

I know in solr its flat file system and the data will be in denormalized
form.

My question :

Have 3 tables,

1) user (userid, firstname, lastname, ...)
2) master (masterid, skills, ...)
3) child (childid, masterid, userid, ...)

In solr, i have added all these field for each document.

Example,

childid,masterid,userid,skills,firstname,lastname

Real Data Example,

1(childid),1(masterid),1(userid),"java,jsp","baskar","sks"
2(childid),1(masterid),1(userid),"java,jsp","baskar","sks"
3(childid),1(masterid),1(userid),"java,jsp","baskar","sks"

The above data sample is from solr document.
 In my search result, i will have to show all these fields.

 User may change the name at any time.The same has to be updated in solr.

In this case, i need to find all the child id that belongs to the user and
update the username with those child ids.

Please tell me if there is any other better approach than this.

Thanks,
Baskar.S






On Sun, Sep 15, 2013 at 9:42 PM, Gora Mohanty  wrote:

> On 15 September 2013 21:36, Baskar Sikkayan  wrote:
> >
> > Hi,
> >   Thanks for the reply. I got it now. Is there XSD for schema.xml and
> > solrconfig.xml?
> > Also, if i have two different fields with different filed type, how can
> > differentiate it in SolrJava client.
> >
> > SolrInputDocument doc = new SolrInputDocument();
> >
> >   doc.addField("cat", "book");
> >   doc.addField("id", "book-" + i);
> >   doc.addField("name", "The Legend of the Hobbit part " + i);
> >   server.add(doc);
> >
> > Is there any option here to put the field type?
> [...]
>
> Field types are defined in schema.xml.
>
> I would again suggest approaching things systematically,
> and understanding how the various pieces work.
>
> Regards,
> Gora
>


Re: Committing when indexing in parallel

2013-09-15 Thread Phani Chaitanya
Thanks Jack. In this case my question is just out of curiosity around what
happens in the scenario I mentioned. Nothing else.

Regards,
Phani.



-
Phani Chaitanya
--
View this message in context: 
http://lucene.472066.n3.nabble.com/Committing-when-indexing-in-parallel-tp4089953p4090243.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Committing when indexing in parallel

2013-09-15 Thread Yonik Seeley
On Fri, Sep 13, 2013 at 5:21 PM, Phani Chaitanya  wrote:
> I'm wondering what happens to commit while we are indexing in parallel in
> Solr. Are the indexing update requests blocked until the commit finishes ?

Nope.  The add (updates) and commit can proceed in parallel.
Because of this, the add that is happening at the same time as the
commit may or may not make it into the commit.  The add would make it
into the next commit after the add completes of course.

-Yonik
http://lucidworks.com


Re: Committing when indexing in parallel

2013-09-15 Thread Phani Chaitanya
Thanks Yonik.



-
Phani Chaitanya
--
View this message in context: 
http://lucene.472066.n3.nabble.com/Committing-when-indexing-in-parallel-tp4089953p4090246.html
Sent from the Solr - User mailing list archive at Nabble.com.


sorl4.4:solrcloud shard state is active,but all replicas state became to down??

2013-09-15 Thread zhaoxin
  after solrcloud run oneday ,zookeeper: /clusterstate.json,shard state
is active,but all replicas stats are down!
  "shard5":{
"range":"4ccc-7fff",
"state":"active",
"replicas":{
  "core_node1":{
"state":"down",
"core":"core5",
"node_name":"10.13.0.73:8080_solr",
"base_url":"http://10.13.0.73:8080/solr";,
"leader":"true"},
  "core_node8":{
"state":"down",
"core":"core5",
"node_name":"10.13.0.74:8080_solr",
"base_url":"http://10.13.0.74:8080/solr"}}



--
View this message in context: 
http://lucene.472066.n3.nabble.com/sorl4-4-solrcloud-shard-state-is-active-but-all-replicas-state-became-to-down-tp4090262.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Wrapper for SOLR for Compression

2013-09-15 Thread William Bell
OK I get it now...

I love your suggestion :

"We could probably ship a bunch of CompressingStoredFieldsFormat and
CompressingTermVectorsFormat variants, each using a diff compression
level, to make configuration easier -- but it would not be a trivial new
option to add."



On Fri, Sep 13, 2013 at 3:27 PM, Chris Hostetter
wrote:

>
> : I asked this before... But can we add a parameter for SOLR to expose the
> : compression modes to solrconfig.xml ?
>
> Bill: note my previous response...
>
>
> https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201304.mbox/%3Calpine.DEB.2.02.1304251901350.3628@frisbee%3E
>
> ...because of how the codecs are setup, there isn't anything (i can see)
> that solr could easily do with such a setting to instruct the codec to use
> a diff compression level.
>
> you would need to write a new custom codec that used the compression level
> you want, and configure it that way.
>
> We could probably ship a bunch of CompressingStoredFieldsFormat and
> CompressingTermVectorsFormat variants, each using a diff compression
> level, to make configuration easier -- but it would not be a trivial new
> option to add.
>
>
> -Hoss
>



-- 
Bill Bell
billnb...@gmail.com
cell 720-256-8076


Frequent softCommits leading to high faceting times?

2013-09-15 Thread Rohit Kumar
Hi,

We are running *SOLR 4.3* with 8 Gb of index on

Ubuntu 12.04 64 bits
Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz Single core.
16GB RAM


We just started using the autoSoftCommit feature and noticed the facet
queries slowed down from milliseconds taking earlier to a minute. We have *8
facet fields*.

We add close to 300 documents per second during peak interval.


60
false



1000



Here is some information i got with debugQuery. Please note that *facet
time is more than 50 seconds.*


50779.0

0.0


41.0

*
50590.0
*

0.0


0.0


0.0


5.0


143.0



Please help.

Thanks,
Rohit Kumar