Re: Solrj - Document [null] missing required field: id

2010-04-20 Thread Tan-Vinh Nguyen
Sepehr wrote:
> Hi All,
> 
> I have a problem when indexing documents with Solrj. I have a Java
> bean and when I try to index my object using addBean method, I get a
> bad request response from Solr, complaining with this message:
> "SEVERE: org.apache.solr.common.SolrException: Document [null] missing
> required field: id". But I am specifically setting the id field on my
> bean. I read somewhere that this might be because of unique key
> constraint, but I have tried very unique ids too.
> 
> I have this in my schema:  indexed="true" stored="true" required="true" />
> I have a @Field String id; in my Java class and I use the setId(String
> id) method after constructing my object. My object is correctly
> constructed and is not null either.
> I don't understand what is going wrong here.
> 
> Thanks,
> Sepehr

Do you have this entry

id

in your schema.xml?

Another reason might be that JPA uses uppercase identifiers. Annotate
your field explicitly like that

@Id
@Column(name="id")
private String id;

Kind regards

tn


RE: dismax vs the standard query handlers

2010-04-20 Thread caman

Your answers are here. Wiki describes it pretty well

 

http://wiki.apache.org/solr/DisMaxRequestHandler

 

 

 

From: Sandhya Agarwal [via Lucene] 
[mailto:ml-node+739071-961078546-124...@n3.nabble.com] 
Sent: Tuesday, April 20, 2010 9:40 PM
To: caman
Subject: dismax vs the standard query handlers

 

Hello, 

What are the advantages of using the “dismax” query handler vs the “standard” 
query handler.  As I understand, “dismax” queries are parsed differently and 
provide more flexibility w.r.t score boosting etc. Do we have any more reasons 
? 

Thanks, 
Sandhya 



  _  

View message @ 
http://n3.nabble.com/dismax-vs-the-standard-query-handlers-tp739071p739071.html 
To start a new topic under Solr - User, email 
ml-node+472068-464289649-124...@n3.nabble.com 
To unsubscribe from Solr - User, click < (link removed) >  here. 

 


-- 
View this message in context: 
http://n3.nabble.com/dismax-vs-the-standard-query-handlers-tp739071p739081.html
Sent from the Solr - User mailing list archive at Nabble.com.


dismax vs the standard query handlers

2010-04-20 Thread Sandhya Agarwal
Hello,

What are the advantages of using the “dismax” query handler vs the “standard” 
query handler.  As I understand, “dismax” queries are parsed differently and 
provide more flexibility w.r.t score boosting etc. Do we have any more reasons ?

Thanks,
Sandhya


Re: DIH dataimport.properties with

2010-04-20 Thread Shawn Heisey

On 4/20/2010 9:09 PM, caman wrote:

Shawn,

Is this your custom implementation?

"For a delta-import, minDid comes from
the maxDid value stored after the last successful import."

Are you updating the dataTable after the import was successful? How did you
handle this? I have similar scenario and your approach will work for my
use-case as well
   


For safety, I do not use a DB user with write access.  I have all the 
build infrastructure that I wrote (perl scripts) in an NFS share that 
all the hosts can reach.  One of the directories under that share is a 
series of config files that guide the automation.  The important one for 
this is named minDid.  The update script changes that config file when 
the delta-import is successful, so that the machine with the cronjobs 
(whichever host in the load balancer cluster is active) can access it 
the next time around.  Everything is centralized in this way because 
there are multiple shards (and two different roles in the index as a 
whole), so the update, delete, and rebuild scripts run in one place and 
do remote operations via HTTP.


I believe it would likely be possible to use a hybrid of the regular DIH 
method and my method to retrieve the milestone from the database with 
DIH, but store it with an external process.  Lance Norskog has asked 
that I file a JIRA request to have DIH use arbitrary milestones, which I 
think is a very good idea.




Re: DIH dataimport.properties with

2010-04-20 Thread Michael Tibben

Hey Shawn,

Thanks for the tip. This will work nicely.

I totally missed the ability to use request parameters using 
${dataimporter.request.* }


This way, I can maintain my own last_index_time timestamp outside of the 
DIH properties file.


Much appreciation

Regards,

Michael



On 21/04/10 09:34, Shawn Heisey wrote:

Michael,

The SolrEntityProcessor looks very intriguing, but it won't work with
the released 1.4 version.  If that's OK with you and it looks like it'll
do what you want, feel free to ignore the rest of this.

I'm also using MySQL as an import source for Solr.  I was unable to use
the last_index_time because my database doesn't have a field I can match
against it.  I believe you can use something similar to the method that
I came up with.  The point of this post is to show you how to inject
values from outside Solr into a DIH request rather than have Solr
provide the milestone that indicates new content.

Here's a simplified version of my URL template and entity configuration
in data-config.xml.  The did field in my database is an autoincrement
BIGINT serving as my private key, but something similar could likely be
cooked up with timestamps too:

http://HOST:PORT/solr/CORE/dataimport?command=COMMAND&dataTable=DATATABLE&minDid=MINDID&maxDid=MAXDID








If I am doing a full-import, I set minDid to zero and maxDid to the
highest value in the database.  For a delta-import, minDid comes from
the maxDid value stored after the last successful import.

The deltaQuery is required, but in my case, is a throw-away query that
just tells Solr the delta-import needs to be run.  My query and
deltaImportQuery are identical, though yours may not be.

Good luck, no matter how you choose to approach this.

Shawn


On 4/18/2010 9:02 PM, Michael Tibben wrote:
   

I don't really understand how this will help. Can you elaborate ?

Do you mean that the last_index_time can be imported from somewhere
outside solr?  But I need to be able to *set* what last_index_time is
stored in dataimport.properties, not get properties from somewhere else



On 18/04/10 10:02, Lance Norskog wrote:
 

The SolrEntityProcessor allows you to query a Solr instance and use
the results as DIH properties. You would have to create your own
regular query to do the delta-import instead of using the delta-import
feature.
   
   


RE: DIH dataimport.properties with

2010-04-20 Thread caman

Shawn,

 

Is this your custom implementation?

 

"For a delta-import, minDid comes from 
the maxDid value stored after the last successful import.

"

 

Are you updating the dataTable after the import was successful? How did you
handle this? I have similar scenario and your approach will work for my
use-case as well

 

 

thanks

 

 

 

 

 

From: Shawn Heisey-4 [via Lucene]
[mailto:ml-node+738653-1765413222-124...@n3.nabble.com] 
Sent: Tuesday, April 20, 2010 4:35 PM
To: caman
Subject: Re: DIH dataimport.properties with

 

Michael, 

The SolrEntityProcessor looks very intriguing, but it won't work with 
the released 1.4 version.  If that's OK with you and it looks like it'll 
do what you want, feel free to ignore the rest of this. 

I'm also using MySQL as an import source for Solr.  I was unable to use 
the last_index_time because my database doesn't have a field I can match 
against it.  I believe you can use something similar to the method that 
I came up with.  The point of this post is to show you how to inject 
values from outside Solr into a DIH request rather than have Solr 
provide the milestone that indicates new content. 

Here's a simplified version of my URL template and entity configuration 
in data-config.xml.  The did field in my database is an autoincrement 
BIGINT serving as my private key, but something similar could likely be 
cooked up with timestamps too: 

http://HOST:PORT/solr/CORE/dataimport?command=COMMAND
 &dataTable=DATATABLE&minDid=MINDID&maxDid=MAXDID

 

 
 

 

If I am doing a full-import, I set minDid to zero and maxDid to the 
highest value in the database.  For a delta-import, minDid comes from 
the maxDid value stored after the last successful import. 

The deltaQuery is required, but in my case, is a throw-away query that 
just tells Solr the delta-import needs to be run.  My query and 
deltaImportQuery are identical, though yours may not be. 

Good luck, no matter how you choose to approach this. 

Shawn 


On 4/18/2010 9:02 PM, Michael Tibben wrote: 


> I don't really understand how this will help. Can you elaborate ? 
> 
> Do you mean that the last_index_time can be imported from somewhere 
> outside solr?  But I need to be able to *set* what last_index_time is 
> stored in dataimport.properties, not get properties from somewhere else 
> 
> 
> 
> On 18/04/10 10:02, Lance Norskog wrote: 
>> The SolrEntityProcessor allows you to query a Solr instance and use 
>> the results as DIH properties. You would have to create your own 
>> regular query to do the delta-import instead of using the delta-import 
>> feature. 





  _  

View message @
http://n3.nabble.com/DIH-dataimport-properties-with-tp722924p738653.html 
To start a new topic under Solr - User, email
ml-node+472068-464289649-124...@n3.nabble.com 
To unsubscribe from Solr - User, click
< (link removed) 
yc3R1ZmZAZ21haWwuY29tfDQ3MjA2OHwtOTM0OTI1NzEx>  here. 

 


-- 
View this message in context: 
http://n3.nabble.com/DIH-dataimport-properties-with-tp722924p738949.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: DIH dataimport.properties with

2010-04-20 Thread Lance Norskog
Please file a JIRA asking for the ability to direct what is saved in
the DIH properties file. It should be possible to use your own
timestamp or generated id.

On 4/20/10, Shawn Heisey  wrote:
> Michael,
>
> The SolrEntityProcessor looks very intriguing, but it won't work with
> the released 1.4 version.  If that's OK with you and it looks like it'll
> do what you want, feel free to ignore the rest of this.
>
> I'm also using MySQL as an import source for Solr.  I was unable to use
> the last_index_time because my database doesn't have a field I can match
> against it.  I believe you can use something similar to the method that
> I came up with.  The point of this post is to show you how to inject
> values from outside Solr into a DIH request rather than have Solr
> provide the milestone that indicates new content.
>
> Here's a simplified version of my URL template and entity configuration
> in data-config.xml.  The did field in my database is an autoincrement
> BIGINT serving as my private key, but something similar could likely be
> cooked up with timestamps too:
>
> http://HOST:PORT/solr/CORE/dataimport?command=COMMAND&dataTable=DATATABLE&minDid=MINDID&maxDid=MAXDID
>
> 
>
>  query="SELECT * FROM ${dataimporter.request.dataTable} WHERE did >
> ${dataimporter.request.minDid} AND did <=
> ${dataimporter.request.maxDid}"
> deltaQuery="SELECT MAX(did) FROM ${dataimporter.request.dataTable}"
> deltaImportQuery="SELECT * FROM ${dataimporter.request.dataTable} WHERE
> did > ${dataimporter.request.minDid} AND did <=
> ${dataimporter.request.maxDid}">
> 
>
> 
>
> If I am doing a full-import, I set minDid to zero and maxDid to the
> highest value in the database.  For a delta-import, minDid comes from
> the maxDid value stored after the last successful import.
>
> The deltaQuery is required, but in my case, is a throw-away query that
> just tells Solr the delta-import needs to be run.  My query and
> deltaImportQuery are identical, though yours may not be.
>
> Good luck, no matter how you choose to approach this.
>
> Shawn
>
>
> On 4/18/2010 9:02 PM, Michael Tibben wrote:
>> I don't really understand how this will help. Can you elaborate ?
>>
>> Do you mean that the last_index_time can be imported from somewhere
>> outside solr?  But I need to be able to *set* what last_index_time is
>> stored in dataimport.properties, not get properties from somewhere else
>>
>>
>>
>> On 18/04/10 10:02, Lance Norskog wrote:
>>> The SolrEntityProcessor allows you to query a Solr instance and use
>>> the results as DIH properties. You would have to create your own
>>> regular query to do the delta-import instead of using the delta-import
>>> feature.
>
>


-- 
Lance Norskog
goks...@gmail.com


Spell check suggesting corrections for boost function

2010-04-20 Thread Cuong Do
I'm trying to perform spell checking as part of a query using the Lucene
parser, and I'm finding that the spell checker is giving me suggestions for
the mathematical functions used in my boost clause.  Here's my request as
seen through solr admin:


true
xml
5
*,score
0

{!boost b=log(linear(journal_entry_count,0.0001,1)) v=$qq}


username_exact:(test)^4.5 username_exact:(test~)^3 username:(test)^3.0
username:(test~)^2 about_me:(test)^1.5 about_me:(test~)^1
medical_conditions:(test)^1.5 medical_conditions:(test~)^1 name:(test)^1.5
name:(test~)^1 email:(test)^1.5 email:(test~)^1



Here are the spellcheck suggestions given to me (note the terms "log" and
"linear" that aren't part of the actual query):



  < this is not part of the query
proper
1
2
7

best


< this is not part of the query
proper
1
10
13

long

   
[rest removed]


Am I doing something wrong with the boosting part of the query?  Is there a
way to exclude the functions in the boost clause from spell checking?

Thanks
Cuong


Re: "json.nl=arrarr" does not work with "facet.date"

2010-04-20 Thread Chris Hostetter

: > If order is more important here, then it should have been a NamedList.

Yeah ... i think this is one of those cases where we were too overzealous 
with SimpleOrderedMap

: I need to parse through this list with javascript so would like to set the
: output to an array if possible?

it's not possible right now -- you'll have to convert the map to a list in 
javascript and sort it.  fortunately i don't think that hsould be too hard 
(but my javascript is rusty, so i'm not sure off the top of my head what 
it would look like)



-Hoss



Re: DIH dataimport.properties with

2010-04-20 Thread Shawn Heisey

Michael,

The SolrEntityProcessor looks very intriguing, but it won't work with 
the released 1.4 version.  If that's OK with you and it looks like it'll 
do what you want, feel free to ignore the rest of this.


I'm also using MySQL as an import source for Solr.  I was unable to use 
the last_index_time because my database doesn't have a field I can match 
against it.  I believe you can use something similar to the method that 
I came up with.  The point of this post is to show you how to inject 
values from outside Solr into a DIH request rather than have Solr 
provide the milestone that indicates new content.


Here's a simplified version of my URL template and entity configuration 
in data-config.xml.  The did field in my database is an autoincrement 
BIGINT serving as my private key, but something similar could likely be 
cooked up with timestamps too:


http://HOST:PORT/solr/CORE/dataimport?command=COMMAND&dataTable=DATATABLE&minDid=MINDID&maxDid=MAXDID



query="SELECT * FROM ${dataimporter.request.dataTable} WHERE did > 
${dataimporter.request.minDid} AND did <= 
${dataimporter.request.maxDid}"

deltaQuery="SELECT MAX(did) FROM ${dataimporter.request.dataTable}"
deltaImportQuery="SELECT * FROM ${dataimporter.request.dataTable} WHERE 
did > ${dataimporter.request.minDid} AND did <= 
${dataimporter.request.maxDid}">





If I am doing a full-import, I set minDid to zero and maxDid to the 
highest value in the database.  For a delta-import, minDid comes from 
the maxDid value stored after the last successful import.


The deltaQuery is required, but in my case, is a throw-away query that 
just tells Solr the delta-import needs to be run.  My query and 
deltaImportQuery are identical, though yours may not be.


Good luck, no matter how you choose to approach this.

Shawn


On 4/18/2010 9:02 PM, Michael Tibben wrote:

I don't really understand how this will help. Can you elaborate ?

Do you mean that the last_index_time can be imported from somewhere 
outside solr?  But I need to be able to *set* what last_index_time is 
stored in dataimport.properties, not get properties from somewhere else




On 18/04/10 10:02, Lance Norskog wrote:

The SolrEntityProcessor allows you to query a Solr instance and use
the results as DIH properties. You would have to create your own
regular query to do the delta-import instead of using the delta-import
feature.




Pass init params into a custom UpdateHandler?

2010-04-20 Thread Jason Rutherglen
How does one do this?  UpdateHandler doesn't override the init method
like SearchHandler.


RE: Odd query result

2010-04-20 Thread Charlie Jackson
I'll take another look and see if it makes sense to have the index and
query time parameters the same or different.

As far as the initial issue, I think you're right Tom, it is hitting on
both. I think what threw me off was the highlighting -- in one of my
matching documents, the term "I-CAR" is highlighted, but I think it
actually hit on the term "ISHIN-I (car" which is also in the document.

The debug output for my query is 

ft:I-Car
ft:I-Car
+MultiPhraseQuery(ft:"i (car icar)")
+ft:"i (car icar)"

Thanks!

-Original Message-
From: Tom Hill [mailto:solr-l...@worldware.com] 
Sent: Tuesday, April 20, 2010 2:08 PM
To: solr-user@lucene.apache.org
Subject: Re: Odd query result

I agree that, if they are the same, you want to merge them.

In this case, I don't think you want them to be the same. In particular,
you
usually don't want to catenateWords and catenateNumbers both index time
AND
at query time. You generate the permutations on one, or the other, but
you
don't need to do it for both. I usually do it at index time

Tom

On Tue, Apr 20, 2010 at 11:29 AM, MitchK  wrote:

>
> It has nothing to do with your problem, since it seems to work when
Tom
> tested it.
> However, it seems like you are using the same configurations on query-
and
> index-type analyzer.
> If you did not hide anything from (for example own
filter-implementations),
> because you don't want to confuse us, you can just delete the
definitions
> "type=index" and "type=query". If you do so, the whole
> fieldType-filter-configuration will be applied on both: index- and
> query-time. There is no need to specify two equal ones.
>
> I think this would be easier to maintain in future :).
>
> Kind regards
> - Mitch
>
> -->
>  
>
>
>
> synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
>
>
>ignoreCase="true"
>
>words="stopwords.txt"
>
>enablePositionIncrements="true"
>
>/>
>
> generateWordParts="1" generateNumberParts="1" catenateWords="1"
> catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
>
>
>
>
>
>  
> --
> View this message in context:
> http://n3.nabble.com/Odd-query-result-tp732958p733095.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Jetty, Tomcat or JBoss?

2010-04-20 Thread Bill Au
I never said they weren't.

Bill

On Tue, Apr 20, 2010 at 5:54 PM, Abdelhamid ABID  wrote:

> Which are JEE Web components, aren't they?
>
> On 4/20/10, Bill Au  wrote:
> >
> > Solr only uses Servlet and JSP.
> >
> >
> > Bill
> >
> >
> > On Sat, Apr 17, 2010 at 9:11 AM, Abdelhamid ABID 
> > wrote:
> >
> > > Solr does use JEE WEB components
> > >
> > > On 4/17/10, Lukáš Vlček  wrote:
> > > >
> > > > Hi,
> > > >
> > > > may be you should be aware that JBoss AS is using Tomcat for web
> > > container
> > > > (with modified classloader), so if your web application is running
> > inside
> > > > JBoss AS then it is in fact running in Tomcat.
> > > > I don't think Solr uses JEE technologies provided by JEE Application
> > > server
> > > > (JMS, Transaction services, pooling services, clustered EJB...
> etc...).
> > > All
> > > > it requires is web container AFAIK. This being said it will always
> take
> > > > longer for application server to start and it will require more
> > resources
> > > > as
> > > > opposed to lightweight web container.
> > > >
> > > > Regards,
> > > > Lukas
> > > >
> > > >
> > > > On Sat, Apr 17, 2010 at 11:08 AM, Andrea Gazzarini <
> > > > andrea.gazzar...@atcult.it> wrote:
> > > >
> > > > > Hi all,
> > > > > I have a web application which is basically a (user) search
> interface
> > > > > towards SOLR.
> > > > > My index is something like 7GB and has a lot of records so apart
> > other
> > > > > things like optiming SOLR schema, config ,clustering etc... I'd
> like
> > to
> > > > keep
> > > > > SOLR installation as light as possible.
> > > > > At the moment my SOLR instance is running under JBoss but I saw
> that
> > > > > running under the bundled Jetty it takes a very little amount of
> > memory
> > > > (at
> > > > > least at startup and after one hour of usage)
> > > > >
> > > > > So my questions is: since SOLR is using JEE web components what are
> > the
> > > > > drawback of using the following architecture?
> > > > >
> > > > > -My Application (Full JEE application with web components and EJB)
> on
> > > > > JBoss;
> > > > > - SOLR on Jetty or Tomcat
> > > > >
> > > > > Having said that and supposing that the idea is good, what are the
> > main
> > > > > differences / advantages / disadvamtages (from this point of view)
> > > > between
> > > > > Tomcat and Jetty?
> > > > >
> > > > > Best Regards,
> > > > > Andrea
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Abdelhamid ABID
> > >
> >
>
>
>
> --
> Abdelhamid ABID
> Software Engineer- J2EE / WEB
>


Re: Jetty, Tomcat or JBoss?

2010-04-20 Thread Abdelhamid ABID
Which are JEE Web components, aren't they?

On 4/20/10, Bill Au  wrote:
>
> Solr only uses Servlet and JSP.
>
>
> Bill
>
>
> On Sat, Apr 17, 2010 at 9:11 AM, Abdelhamid ABID 
> wrote:
>
> > Solr does use JEE WEB components
> >
> > On 4/17/10, Lukáš Vlček  wrote:
> > >
> > > Hi,
> > >
> > > may be you should be aware that JBoss AS is using Tomcat for web
> > container
> > > (with modified classloader), so if your web application is running
> inside
> > > JBoss AS then it is in fact running in Tomcat.
> > > I don't think Solr uses JEE technologies provided by JEE Application
> > server
> > > (JMS, Transaction services, pooling services, clustered EJB... etc...).
> > All
> > > it requires is web container AFAIK. This being said it will always take
> > > longer for application server to start and it will require more
> resources
> > > as
> > > opposed to lightweight web container.
> > >
> > > Regards,
> > > Lukas
> > >
> > >
> > > On Sat, Apr 17, 2010 at 11:08 AM, Andrea Gazzarini <
> > > andrea.gazzar...@atcult.it> wrote:
> > >
> > > > Hi all,
> > > > I have a web application which is basically a (user) search interface
> > > > towards SOLR.
> > > > My index is something like 7GB and has a lot of records so apart
> other
> > > > things like optiming SOLR schema, config ,clustering etc... I'd like
> to
> > > keep
> > > > SOLR installation as light as possible.
> > > > At the moment my SOLR instance is running under JBoss but I saw that
> > > > running under the bundled Jetty it takes a very little amount of
> memory
> > > (at
> > > > least at startup and after one hour of usage)
> > > >
> > > > So my questions is: since SOLR is using JEE web components what are
> the
> > > > drawback of using the following architecture?
> > > >
> > > > -My Application (Full JEE application with web components and EJB) on
> > > > JBoss;
> > > > - SOLR on Jetty or Tomcat
> > > >
> > > > Having said that and supposing that the idea is good, what are the
> main
> > > > differences / advantages / disadvamtages (from this point of view)
> > > between
> > > > Tomcat and Jetty?
> > > >
> > > > Best Regards,
> > > > Andrea
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > Abdelhamid ABID
> >
>



-- 
Abdelhamid ABID
Software Engineer- J2EE / WEB


Re: Jetty, Tomcat or JBoss?

2010-04-20 Thread Bill Au
Solr only uses Servlet and JSP.

Bill

On Sat, Apr 17, 2010 at 9:11 AM, Abdelhamid ABID  wrote:

> Solr does use JEE WEB components
>
> On 4/17/10, Lukáš Vlček  wrote:
> >
> > Hi,
> >
> > may be you should be aware that JBoss AS is using Tomcat for web
> container
> > (with modified classloader), so if your web application is running inside
> > JBoss AS then it is in fact running in Tomcat.
> > I don't think Solr uses JEE technologies provided by JEE Application
> server
> > (JMS, Transaction services, pooling services, clustered EJB... etc...).
> All
> > it requires is web container AFAIK. This being said it will always take
> > longer for application server to start and it will require more resources
> > as
> > opposed to lightweight web container.
> >
> > Regards,
> > Lukas
> >
> >
> > On Sat, Apr 17, 2010 at 11:08 AM, Andrea Gazzarini <
> > andrea.gazzar...@atcult.it> wrote:
> >
> > > Hi all,
> > > I have a web application which is basically a (user) search interface
> > > towards SOLR.
> > > My index is something like 7GB and has a lot of records so apart other
> > > things like optiming SOLR schema, config ,clustering etc... I'd like to
> > keep
> > > SOLR installation as light as possible.
> > > At the moment my SOLR instance is running under JBoss but I saw that
> > > running under the bundled Jetty it takes a very little amount of memory
> > (at
> > > least at startup and after one hour of usage)
> > >
> > > So my questions is: since SOLR is using JEE web components what are the
> > > drawback of using the following architecture?
> > >
> > > -My Application (Full JEE application with web components and EJB) on
> > > JBoss;
> > > - SOLR on Jetty or Tomcat
> > >
> > > Having said that and supposing that the idea is good, what are the main
> > > differences / advantages / disadvamtages (from this point of view)
> > between
> > > Tomcat and Jetty?
> > >
> > > Best Regards,
> > > Andrea
> > >
> > >
> >
>
>
>
> --
> Abdelhamid ABID
>


RE: Solr Core Creation

2010-04-20 Thread abhatna...@vantage.com

  
http://localhost:8983/solr/admin/cores?action=CREATE&name=temp&instanceDir=

where  is the solr_home/home/core

The core is created fine but no directory shows for the new core name "temp"

Ankit


-- 
View this message in context: 
http://n3.nabble.com/Solr-Core-Creation-tp733159p733344.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Big problem with solr in an official server.

2010-04-20 Thread Villemos, Gert
http://www.lucidimagination.com/blog/2010/01/21/the-seven-deadly-sins-of-solr/
 
Regards,
Gert.



From: MitchK [mailto:mitc...@web.de]
Sent: Mon 4/19/2010 7:06 PM
To: solr-user@lucene.apache.org
Subject: Re: Big problem with solr in an official server.




Wasn't there a good posting on lucidworks.com?
The title was something like "deadly sins" or so.

There are some good suggestions on things like that :).

Kind regards
- Mitch
--
View this message in context: 
http://n3.nabble.com/Big-problem-with-solr-in-an-official-server-tp730049p730168.html
Sent from the Solr - User mailing list archive at Nabble.com.





Please help Logica to respect the environment by not printing this email  / 
Pour contribuer comme Logica au respect de l'environnement, merci de ne pas 
imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie 
so Logica dabei, die Umwelt zu schützen. /  Por favor ajude a Logica a 
respeitar o ambiente nao imprimindo este correio electronico.



This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.



RE: Solr Core Creation

2010-04-20 Thread caman

What was the command executed? 

 

 

From: abhatna...@vantage.com [via Lucene]
[mailto:ml-node+733159-1790924601-124...@n3.nabble.com] 
Sent: Tuesday, April 20, 2010 11:58 AM
To: caman
Subject: Solr Core Creation

 

I tried creating a core on the fly using remote server 

-I am able to query against it however it didn't create any new folder
inside solr home 

is this the expected behavior? 

I tried searching for this topic but couldn't found any good answer. 



-Ankit 

  _  

View message @ http://n3.nabble.com/Solr-Core-Creation-tp733159p733159.html 
To start a new topic under Solr - User, email
ml-node+472068-464289649-124...@n3.nabble.com 
To unsubscribe from Solr - User, click
< (link removed) 
yc3R1ZmZAZ21haWwuY29tfDQ3MjA2OHwtOTM0OTI1NzEx>  here. 

 


-- 
View this message in context: 
http://n3.nabble.com/Solr-Core-Creation-tp733159p733268.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Odd query result

2010-04-20 Thread Tom Hill
I agree that, if they are the same, you want to merge them.

In this case, I don't think you want them to be the same. In particular, you
usually don't want to catenateWords and catenateNumbers both index time AND
at query time. You generate the permutations on one, or the other, but you
don't need to do it for both. I usually do it at index time

Tom

On Tue, Apr 20, 2010 at 11:29 AM, MitchK  wrote:

>
> It has nothing to do with your problem, since it seems to work when Tom
> tested it.
> However, it seems like you are using the same configurations on query- and
> index-type analyzer.
> If you did not hide anything from (for example own filter-implementations),
> because you don't want to confuse us, you can just delete the definitions
> "type=index" and "type=query". If you do so, the whole
> fieldType-filter-configuration will be applied on both: index- and
> query-time. There is no need to specify two equal ones.
>
> I think this would be easier to maintain in future :).
>
> Kind regards
> - Mitch
>
> -->
>  
>
>
>
> synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
>
>
>ignoreCase="true"
>
>words="stopwords.txt"
>
>enablePositionIncrements="true"
>
>/>
>
> generateWordParts="1" generateNumberParts="1" catenateWords="1"
> catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
>
>
>
>
>
>  
> --
> View this message in context:
> http://n3.nabble.com/Odd-query-result-tp732958p733095.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: I have a big problem with pagination using apache solr and haystack

2010-04-20 Thread Israel Ekpo
I hear this sort of complaint frequently.

Make ensure you did not forget to send a commit request after deleting any
documents you have removed.

Until the commit request is made those deletes are not yet finalized and the
removed documents will still show up

On Tue, Apr 20, 2010 at 2:37 PM, MitchK  wrote:

>
> Hi Isaac,
>
> how did you implement pagination in Solr? What did you do there?
> Did you ever had a look at your index with q=*:*?
> Maybe you've forgotten to delete some news while testing your application
> and so there are some duplicates.
>
> Another thing is: If you have got only 20 news and Solr seems to have 40
> you
> should be able to find those which are doubled. If not - don't change
> anything, try to find a corporation with a lot of money and declare "I've
> got an application which writes its own news - artificial intelligence?
> Here
> you are!" :).
>
> Hope this helps
> - Mitch
> --
> View this message in context:
> http://n3.nabble.com/I-have-a-big-problem-with-pagination-using-apache-solr-and-haystack-tp732572p733115.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
"Good Enough" is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.
http://www.israelekpo.com/


Solr Core Creation

2010-04-20 Thread abhatna...@vantage.com

I tried creating a core on the fly using remote server

-I am able to query against it however it didn't create any new folder
inside solr home

is this the expected behavior?

I tried searching for this topic but couldn't found any good answer.



-Ankit
-- 
View this message in context: 
http://n3.nabble.com/Solr-Core-Creation-tp733159p733159.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solrj - Document [null] missing required field: id

2010-04-20 Thread Sepehr
Hi All,

I have a problem when indexing documents with Solrj. I have a Java
bean and when I try to index my object using addBean method, I get a
bad request response from Solr, complaining with this message:
"SEVERE: org.apache.solr.common.SolrException: Document [null] missing
required field: id". But I am specifically setting the id field on my
bean. I read somewhere that this might be because of unique key
constraint, but I have tried very unique ids too.

I have this in my schema: 
I have a @Field String id; in my Java class and I use the setId(String
id) method after constructing my object. My object is correctly
constructed and is not null either.
I don't understand what is going wrong here.

Thanks,
Sepehr


Re: I have a big problem with pagination using apache solr and haystack

2010-04-20 Thread MitchK

Hi Isaac,

how did you implement pagination in Solr? What did you do there?
Did you ever had a look at your index with q=*:*?
Maybe you've forgotten to delete some news while testing your application
and so there are some duplicates.

Another thing is: If you have got only 20 news and Solr seems to have 40 you
should be able to find those which are doubled. If not - don't change
anything, try to find a corporation with a lot of money and declare "I've
got an application which writes its own news - artificial intelligence? Here
you are!" :). 

Hope this helps
- Mitch
-- 
View this message in context: 
http://n3.nabble.com/I-have-a-big-problem-with-pagination-using-apache-solr-and-haystack-tp732572p733115.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: dismax and date boosts

2010-04-20 Thread Shawn Heisey
I found what I believe is a better option even if the multiplication 
would work - FROM_UNIXTIME.  That returns the same kind of output as you 
get from an actual database date field.


On 4/20/2010 12:07 PM, Shawn Heisey wrote:
So, if I have my database multiply my value by 1000, I can put that 
directly into a tdate field and it'll work as expected?


If that's the case, I think I might be able to modify my query from 
"SELECT *" to "SELECT *,post_date*1000 as pdate" and add the pdate 
field to the schema as type tdate.  Sound right?



On 4/17/2010 3:00 PM, Lance Norskog wrote:

No, a copyField will not do the xlation from (seconds from epoch) to
(milliseconds from 1/1/1970). You should be able to do this with a
combination of functions in your database SELECT call. The major DBs
all have a wealth of functions that xform between numbers and dates.

The DIH is smart about types: if the DB select returns a value as a
database date type, it becomes a java.sql.Date which the DIH then
makes a Solr 'tdate'.

In MYSQL there's a bunch of time/date/number/string xformers:

http://dev.mysql.com/tech-resources/articles/4.1/time.html

It's easier to do this in the database, than in the DIH.






Re: Odd query result

2010-04-20 Thread MitchK

It has nothing to do with your problem, since it seems to work when Tom
tested it.
However, it seems like you are using the same configurations on query- and
index-type analyzer.
If you did not hide anything from (for example own filter-implementations),
because you don't want to confuse us, you can just delete the definitions
"type=index" and "type=query". If you do so, the whole
fieldType-filter-configuration will be applied on both: index- and
query-time. There is no need to specify two equal ones.

I think this would be easier to maintain in future :).

Kind regards
- Mitch

-->
   

 

 

 

 

 

 

  
-- 
View this message in context: 
http://n3.nabble.com/Odd-query-result-tp732958p733095.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Odd query result

2010-04-20 Thread Tom Hill
When I run it, with that fieldType, it seems to work for me. Here's a sample
query output





 0
 17
 
  on
  0

  xtext:I-Car
  2.2
  10
 


 
  ALLCAPS

  I-CAR
 
 
  CAMEL
  I-Car
 




Did I miss something?

Could you show the output with debugQuery=on for the user's failing query?
Assuming I did this right, I'd next look for is a copyField. Is the user's
query really being executed against this field?

Schema.xml could be useful, too.

Tom

On Tue, Apr 20, 2010 at 10:19 AM, Charlie Jackson <
charlie.jack...@cision.com> wrote:

> I've got an odd scenario with a query a user's running. The user is
> searching for the term "I-Car". It will hit if the document contains the
> term "I-CAR" (all caps) but not if it's "I-Car".  When I throw the terms
> into the analysis page, the resulting tokens look identical, and my
> "I-Car" tokens hit on either term.
>
>
>
> Here's the definition of the field:
>
>
>
> positionIncrementGap="100">
>
>  
>
>
>
>
>ignoreCase="true"
>
>words="stopwords.txt"
>
>enablePositionIncrements="true"
>
>/>
>
> generateWordParts="1" generateNumberParts="1" catenateWords="1"
> catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
>
>
>
>
>
>  
>
>  
>
>
>
> synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
>
>
>ignoreCase="true"
>
>words="stopwords.txt"
>
>enablePositionIncrements="true"
>
>/>
>
> generateWordParts="1" generateNumberParts="1" catenateWords="1"
> catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
>
>
>
>
>
>  
>
>
>
>
>
> I'm pretty sure this has to do with the settings on the
> WordDelimiterFactory, but I must be missing something because I don't
> see anything that would cause the behavior I'm seeing.
>
>


Re: dismax and date boosts

2010-04-20 Thread Shawn Heisey
So, if I have my database multiply my value by 1000, I can put that 
directly into a tdate field and it'll work as expected?


If that's the case, I think I might be able to modify my query from 
"SELECT *" to "SELECT *,post_date*1000 as pdate" and add the pdate field 
to the schema as type tdate.  Sound right?



On 4/17/2010 3:00 PM, Lance Norskog wrote:

No, a copyField will not do the xlation from (seconds from epoch) to
(milliseconds from 1/1/1970). You should be able to do this with a
combination of functions in your database SELECT call. The major DBs
all have a wealth of functions that xform between numbers and dates.

The DIH is smart about types: if the DB select returns a value as a
database date type, it becomes a java.sql.Date which the DIH then
makes a Solr 'tdate'.

In MYSQL there's a bunch of time/date/number/string xformers:

http://dev.mysql.com/tech-resources/articles/4.1/time.html

It's easier to do this in the database, than in the DIH.
   




Odd query result

2010-04-20 Thread Charlie Jackson
I've got an odd scenario with a query a user's running. The user is
searching for the term "I-Car". It will hit if the document contains the
term "I-CAR" (all caps) but not if it's "I-Car".  When I throw the terms
into the analysis page, the resulting tokens look identical, and my
"I-Car" tokens hit on either term. 

 

Here's the definition of the field:

 



  











  

  













  



 

I'm pretty sure this has to do with the settings on the
WordDelimiterFactory, but I must be missing something because I don't
see anything that would cause the behavior I'm seeing. 



Re: Help using boolean operators

2010-04-20 Thread Erick Erickson
That's a fine thing to do, that's what parentheses are for 

Erick

On Tue, Apr 20, 2010 at 1:16 AM, Sandhya Agarwal wrote:

> Thanks Erick. Using parentheses works.
>
> With parentheses, the query,q=field1: (this is a good string) is parsed as
> follows :
>
> +field1:this +field1:good +field1:string
>
> Is that ok to do.
>
> Thanks,
> Sandhya
>
> -Original Message-
> From: Erick Erickson [mailto:erickerick...@gmail.com]
> Sent: Tuesday, April 20, 2010 4:16 AM
> To: solr-user@lucene.apache.org
> Subject: Re: Help using boolean operators
>
> ?id you try parenthesizing:
> field1:(This is a good string)
>
> You can try lots of things easily by going to
> http://localhost:8983/solr/admin/form.jsp
> and clicking the "debug enable" checkbox...
>
> HTH
> Erick
>
> On Mon, Apr 19, 2010 at 12:23 PM, MitchK  wrote:
>
> >
> > Erick,
> >
> > I am a little bit confused, because I wasn't aware of this fact (and have
> > never noticed any wrong behaviour... maybe because I used the
> > dismax-handler).
> > How should I search for
> > field1: This is a good string
> > without doing something like
> > field1:this field1:is ... ?
> > If I quote the whole thing, Solr would search for the whole phrase (and
> > only
> > the whole phrase), or am I wrong?
> >
> > I would test it, if I can, but unfortunately it's not possible at the
> > moment.
> >
> > Thank you!
> >
> > Mitch
> > --
> > View this message in context:
> > http://n3.nabble.com/Help-using-boolean-operators-tp729102p730051.html
> > Sent from the Solr - User mailing list archive at Nabble.com.
> >
>


I have a big problem with pagination using apache solr and haystack

2010-04-20 Thread Ariel
Hi everybody:
I have a big problem with pagination using apache solr and haystack, this is
what it is happening: I have a site where the news are being indexing with
haystack and solr, but the problem is that when a I make the search the
pagination is showing me more match results that what really exists even
more results that total news in my database, for example I have only 20 news
in the database but when I make a search the pagination said 40 matching
results are found then when I navigate with the "next" link to see the other
results any result is showed.

I hope I have made a good explanation of my problem.
Could you help me please ???
I don't know why it is happening that 
Regards.


Re: Wildcard search in phrase query using spanquery

2010-04-20 Thread Ahmet Arslan

> I tried that and got the following result. Do I have to do
> anything other
> than the mentioned instructions to make it work?
> 
> HTTP ERROR: 500
> 
> tried to access field
> org.apache.lucene.queryParser.QueryParser.field from
> class
> org.apache.lucene.queryParser.ComplexPhraseQueryParser$ComplexPhraseQuery
> 
> java.lang.IllegalAccessError: tried to access field
> org.apache.lucene.queryParser.QueryParser.field from class
> org.apache.lucene.queryParser.ComplexPhraseQueryParser$ComplexPhraseQuery

I have never noticed this since i am using this class with custom super class. 
Thanks for it. 

It seems that the reason:

"A class loaded by one classloader can't
access package-visible members in a class loaded by a different
classloader even if they are nominally in the same package." [1]

[1]http://www.pubbs.net/grails/200911/37981/

I think easiest thing to do is to place ComplexPhrase-1.0.jar (created by mvn 
package) under apache-solr-1.4.0\lib directory. 
And create a new apache-solr-1.4.0\dist\apache-solr-1.4.1-dev.war 
by invoking "ant dist" . I tested this solution and it works as a workaround.  

It would be great if you give us feedback after using it.


  


Re: Best Open Source

2010-04-20 Thread Michael Kuhlmann
Nice site. Really!

In addition to Dave:
How do I search with tags enabled?
If I search for "Blog", I can see that there's one blog software written
in Java. When I click on the Java tag, then my search is discarded, and
I get all Java software. when I do my search again, the tag filter is
lost. It seems to be impossible to combine tag filters with search.

-Michael

Am 20.04.2010 11:00, schrieb solai ganesh:
> Hello all,
> 
> We have launched a new site hosting the best open source products and
> libraries across all categories. This site is powered by Solr search. There
> are many open source products available in all categories and it is
> sometimes difficult to identify which is the best. We identify the best. As
> a open source users, you might be using many opensource products and
> libraries , It would be great, if you help us to identify the best.
> 
> http://www.findbestopensource.com/
> 
> Regards
> Aditya
> 



RE: Best Open Source

2010-04-20 Thread Dave Searle
First impressions, nice site - some feedback:

1) It would be good if the tags in the central column were real facets rather 
than search tags, i.e. they changed depending on my search or selection and 
drilled down to filter results out.

2) It would be good if users could also review and rate their best open source 
software. What may be best for you, may not be best for me. Everything seems to 
be 5 stars?

3) I have to clear the search box myself

4) Auto suggest on the search box would be nice

5) How about a demo area?

Cheers
Dave


-Original Message-
From: solai ganesh [mailto:findbestopensou...@gmail.com] 
Sent: 20 April 2010 10:01
To: solr-user@lucene.apache.org
Subject: Best Open Source

Hello all,

We have launched a new site hosting the best open source products and
libraries across all categories. This site is powered by Solr search. There
are many open source products available in all categories and it is
sometimes difficult to identify which is the best. We identify the best. As
a open source users, you might be using many opensource products and
libraries , It would be great, if you help us to identify the best.

http://www.findbestopensource.com/

Regards
Aditya


Best Open Source

2010-04-20 Thread solai ganesh
Hello all,

We have launched a new site hosting the best open source products and
libraries across all categories. This site is powered by Solr search. There
are many open source products available in all categories and it is
sometimes difficult to identify which is the best. We identify the best. As
a open source users, you might be using many opensource products and
libraries , It would be great, if you help us to identify the best.

http://www.findbestopensource.com/

Regards
Aditya


Re: Wildcard search in phrase query using spanquery

2010-04-20 Thread Maddy.Jsh

I tried that and got the following result. Do I have to do anything other
than the mentioned instructions to make it work?

HTTP ERROR: 500

tried to access field org.apache.lucene.queryParser.QueryParser.field from
class
org.apache.lucene.queryParser.ComplexPhraseQueryParser$ComplexPhraseQuery

java.lang.IllegalAccessError: tried to access field
org.apache.lucene.queryParser.QueryParser.field from class
org.apache.lucene.queryParser.ComplexPhraseQueryParser$ComplexPhraseQuery
at
org.apache.lucene.queryParser.ComplexPhraseQueryParser$ComplexPhraseQuery.parsePhraseElements(ComplexPhraseQueryParser.java:216)
at
org.apache.lucene.queryParser.ComplexPhraseQueryParser.parse(ComplexPhraseQueryParser.java:114)
at
org.apache.solr.search.ComplexPhraseQParser.parse(ComplexPhraseQParserPlugin.java:82)
at org.apache.solr.search.QParser.getQuery(QParser.java:131)
at
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:89)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

RequestURI=/solr/select/

Powered by Jetty://





















-- 
View this message in context: 
http://n3.nabble.com/Wildcard-search-in-phrase-query-using-spanquery-tp729275p731654.html
Sent from the Solr - User mailing list archive at Nabble.com.