RE: newbie question for DataImportHandler

2011-05-24 Thread Zac Smith
Sounds like you might not be committing the delete. How are you deleting it?
If you run the data import handler with clean=true (which is the default) it 
will delete the data for you anyway so you don't need to delete it yourself.

Hope that helps.

-Original Message-
From: antoniosi [mailto:antonio...@gmail.com] 
Sent: Tuesday, May 24, 2011 4:43 PM
To: solr-user@lucene.apache.org
Subject: newbie question for DataImportHandler

Hi,

I am new to Solr; apologize in advance if this is a stupid question.

I have created a simple database, with only 1 table with 3 columns, id, name, 
and last_update fields.

I populate the database with 1 million test rows.
I run solr, go to the data import handler development console and do a full 
import. I use the "Luke" tool to look at the content of the lucene index.

This all works fine so far.

I remove all the 1 million rows from my table and populate the table with 
another million rows of data.
I remove the index that solr previously create. I restart solr and go to the 
data import handler development console and do the full import again.

I use the "Luke" tool to look at the content of the lucene index. However, I am 
seeing the old data in my new index.

Doe Solr keeps a cached copy of the index somewhere?

I hope I have described my problem clearly.

Thanks in advance.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/newbie-question-for-DataImportHandler-tp2982277p2982277.html
Sent from the Solr - User mailing list archive at Nabble.com.


newbie question for DataImportHandler

2011-05-24 Thread antoniosi
Hi,

I am new to Solr; apologize in advance if this is a stupid question.

I have created a simple database, with only 1 table with 3 columns, id,
name, and last_update fields.

I populate the database with 1 million test rows.
I run solr, go to the data import handler development console and do a full
import. I use the "Luke" tool to look at the content of the lucene index.

This all works fine so far.

I remove all the 1 million rows from my table and populate the table with
another million rows of data.
I remove the index that solr previously create. I restart solr and go to the
data import handler development console and do the full import again.

I use the "Luke" tool to look at the content of the lucene index. However, I
am seeing the old data in my new index.

Doe Solr keeps a cached copy of the index somewhere?

I hope I have described my problem clearly.

Thanks in advance.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/newbie-question-for-DataImportHandler-tp2982277p2982277.html
Sent from the Solr - User mailing list archive at Nabble.com.


How to use StreamingUpdateSolrServer?

2011-05-24 Thread deniz
Hi all,

to improve crappy indexing speed i would like to use
StreamingUpdateSolrServer but as a newbie I am not sure where to use... I
have checked the wiki but all i get is how to implement. not where to put
that method... Or maybe i am missing some facts...

anyway, anyone used StreamingUpdateSolrServer before? 

-
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-use-StreamingUpdateSolrServer-tp2982670p2982670.html
Sent from the Solr - User mailing list archive at Nabble.com.


MaxWarming Searcher

2011-05-24 Thread Sujatha Arun
Hello,

We are running our Indexing Script from one server and  our Search Instances
are on another server .We run  a cron job for Indexing  and commit after
ever update ,which I know is not the right thing to do.Sometimes ,but not
always we get this MAxwarming Searcher Exception,
but  the server in which we run the Indexing Script shows a CPU utlilization
of 90-100% during this time .

While a maxWarming Searcher should cause a performance problem in the search
server ,why is this happenning in the server which runs the Indexing script.

Regards
Sujatha


Fwd: Delivery Status Notification (Failure)

2011-05-24 Thread Vivek Kuruvilla
Hello,

I'm a student of Computer Science Engineering, and I'm currently in the
midst of an internship. The project I've been given requires a two phase
search engine using solr that does the following :

a) at run-time, searches documents for particular rules or keywords, which
can help define which category these documents belong to. Based on this, the
documents are forwarded to the respective department which must tend to that
category.

b) in the second phase, the client at any department must be capable of
providing the path/name of a specific document in the database, along with a
query string. the software must be capable of searching for multiple
instances of the given query string in the document, and moving from one to
the other, highlighting each instance with its particular context.

Based on tutorials i've read, I have come to understand that Solr's inbuilt
libraries allow you to scan multiple documents for a particular string, but
not multiple occurances of a string in the same document, though that
calculation does come into the scoring technique.

I would like to know a) if what I'm attempting to develop through my project
is possible, and b) which file must i refer to in order to fully understand
the searching process and alter it for a single document search using
plugins or whatever.

I currently have tomcat and solr 3.1.0 installed on my workstation, along
with the latest jdk and jre versions.

Yours Sincerely,
Vivek Kuruvilla



-- 
Vivek Kuruvilla
General Secretary,
The Illuminati Quizzing Society,
Model Engineering College, Kochi.
Ph : +919030591025
E-mail : kuruvilla.vi...@gmail.com


What is document tag in data-config.xml of Solr

2011-05-24 Thread Romi
Hi, I am working with solr server. i want to fetch data from MySQL database
to solr. the following is the db-data-config.xml:




 

 



i want to know what tag indicates here, can we give more then one
tag here, if possible please refer me some good example

-
Romi
--
View this message in context: 
http://lucene.472066.n3.nabble.com/What-is-document-tag-in-data-config-xml-of-Solr-tp2978420p2978420.html
Sent from the Solr - User mailing list archive at Nabble.com.


JdbcDataSource isolation lelel

2011-05-24 Thread Romi
Hi, i am fetching data from mysql database to solr for indexing. i want to
know what is the default isolation level in jdbcdatasource connection.


-
Romi
--
View this message in context: 
http://lucene.472066.n3.nabble.com/JdbcDataSource-isolation-lelel-tp2978492p2978492.html
Sent from the Solr - User mailing list archive at Nabble.com.


Uploading General documents to Solr

2011-05-24 Thread ester
I understand Solr and how it works a little bit. Its seems intuitive for
storing full text messages. According to the documentation it will store
them in the index file. Wouldn't it be better to store an analyzed version
of the message and store the actual message as a text file somewhere on the
system? The documentation mentiones that Solr stores the documents in the
data direction. But what documents?

Do i have the web application save the file somewhere first and then call an
update query to add the indexable information for this document including a
url to the location of the file? Will this be problematic for load
balancing?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Uploading-General-documents-to-Solr-tp2978963p2978963.html
Sent from the Solr - User mailing list archive at Nabble.com.


DIH import and postImportDeleteQuery

2011-05-24 Thread Alexandre Rocco
Guys,

I am facing a situation in one of our projects that I need to perform a
cleanup to remove some documents after we perform an update via DIH.
The big issue right now comes from the fact that when we call the DIH with
clean=false, the postImportDeleteQuery is not executed.

My setup is currently arranged like this:
- A SQL Server stored procedure that receives a parameter (specified in the
URL) and returns the records to be indexed
- The procedure is able to return all the records (for a full-import) or
only the updated records (for a delta-import)
- This procedure returns valid and deleted records, from this point comes
the need to run a postImportDeleteQuery to remove the deleted ones.

Everything works fine when I run a full-import, I am running always with
clean=true, and then the whole index is rebuilt.
When I need to do an incremental update, the records are updated correctly,
but the command to delete the other records is not executed.

I've tried several combinations, with different results:
- Running full-import with clean=false: the records are updated but the ones
that needs to be deleted stays on the index
- Running delta-import with clean=false: the records are updated but the
ones that needs to be deleted stays on the index
- Running delta-import with clean=true: all records are deleted from the
index and then only the records returned by the procedure are on the index,
except the deleted ones.

I don't see any way to achieve my goal, without changing the process that I
do to obtain the data.
Since this is a very complex stored procedure, with tons of joins and custom
processing, I am trying everything to avoid messing with it.

See below a copy of my data-config.xml file. I made it simpler omitting all
the fields, since it's out of scope of the issue:


















Any ideas or pointers that might help on this one?

Many thanks,
Alexandre


Re: Similarity

2011-05-24 Thread Brian Lamb
This did the trick. Thanks!

On Mon, May 23, 2011 at 5:03 PM, Markus Jelsma
wrote:

> Hmm. I don't add code to Apache packages but create my own packages and
> namespaces, build a jar and add it to the lib directory as specified in
> solrconfig. Then you can use the FQCN to in the similarity config to point
> to
> the class.
>
> May be it can work when messing inside the apache namespace but then you
> have
> to build Lucene as well.
>
>
> > Okay well this is encouraging. I changed SweetSpotSimilarity to
> > MyClassSimilarity. I created this class in:
> >
> > lucene/contrib/misc/src/java/org/apache/lucene/misc/
> >
> > I am getting a ClassNotFoundException when I try to start solr.
> >
> > Here is the contents of the MyClassSimilarity file:
> >
> > package org.apache.lucene.misc;
> > import org.apache.lucene.search.DefaultSimilarity;
> >
> > public class MyClassSimilarity extends DefaultSimilarity {
> >   public MyClassSimilarity() { super(); }
> >   public float idf(int a1, int a2) { return 1; }
> > }
> >
> > So then this raises two questions. Why am I getting a
> > classNotFoundException and how can I go about fixing it?
> >
> > Thanks,
> >
> > Brian Lamb
> >
> > On Mon, May 23, 2011 at 3:41 PM, Markus Jelsma
> >
> > wrote:
> > > As far as i know, SweetSpotSimilarty needs be configured. I did use it
> > > once but
> > > wrapped a factory around it to configure the sweet spot. It worked just
> > > as expected and explained in that paper about the subject.
> > >
> > > If you use a custom similarity that , for example, caps tf to 1. Does
> it
> > > then
> > > work?
> > >
> > > > Hi all,
> > > >
> > > > I'm having trouble getting the basic similarity example to work. If
> you
> > > > notice at the bottom of the schema.xml file, there is a line there
> that
> > >
> > > is
> > >
> > > > commented out:
> > > >
> > > > 
> > > >
> > > > I uncomment that line and replace it with the following:
> > > >
> > > > 
> > > >
> > > > Which comes natively with lucene. However, the scores before and
> after
> > > > making this change are the same. I did a full import both times but
> > > > that didn't seem to help.
> > > >
> > > > I ran svn up on both my solr directory and my lucene directory.
> > > > Actually, my lucene directory was not previously under svn so I
> > > > removed everything in there and did svn co
> > > > http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/
> > > >
> > > > So why isn't my installation taking the SweetSpot Similarity change?
> > > >
> > > > Thanks,
> > > >
> > > > Brian Lamb
>


Re: Help, Data Import not indexing in solr.

2011-05-24 Thread Gora Mohanty
On Tue, May 24, 2011 at 10:55 PM, fredylee
 wrote:
> anybody? help?
[...]

There were various possible errors in your data-import
configuration file, which is why I had suggested starting with the tutorial,
and ensuring that you are first able to reproduce the built-in
examples.

At a minimum, please post your data-import configuration
file, schema.xml, and any errors that you get in the Solr logs
when trying to index. Ideally, please paste each of these
separately on pastebin.com, and send us links.

Regards,
Gora


Re: Help, Data Import not indexing in solr.

2011-05-24 Thread fredylee
anybody? help?

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Help-Data-Import-not-indexing-in-solr-tp2963450p2980718.html
Sent from the Solr - User mailing list archive at Nabble.com.


Termscomponent sort question

2011-05-24 Thread antonio
Hi, i use solr 3.1.
I implemented my autocomplete with TermsComponent. I'm finding, if there is,
a way to sort my finding terms by score.
Example, i there are two terms: "Rome" and "Near Rome", that have the same
count (that is 1), i would that "Rome" will be before "Near Rome".
Because count is the same, if i use index as sort, "Near Rome" is
"lexically" before "Rome".

Is there a way to use score like in dismax for termscomponents? Using
dismax, for example, if i search "Rome", the word "Rome" has max score than
"Near Rome". I would the same behavior with TermComponent.

Is it possible?

Thanks.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Termscomponent-sort-question-tp2980683p2980683.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Dismax + spatial constraints

2011-05-24 Thread Smiley, David W.
Yes. "fq" (filter queries) are independent of the user's query in "q".

On May 24, 2011, at 10:58 AM, Jamie Johnson wrote:

> ok, so anything that goes in q would then be used for dismax but anything
> else could go into fq (or multiple fqs) to apply different criteria in
> addition then correct?
> 
> On Tue, May 24, 2011 at 9:43 AM, Smiley, David W.  wrote:
> 
>> Hi Jamie.
>> 
>> You can definitely use dismax & geospatial; these are unrelated.  Use
>> defType=dismax to get dismax and then use an appropriate geospatial filter
>> like fq={!bbox}&sfield=store&pt=45.15,-93.85&d=5
>> 
>> For temporal based constraints, add a temporal filter query:
>> fq=timestamp:[NOW-1MONTH TO NOW]
>> 
>> ~ David Smiley
>> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>> 
>> On May 24, 2011, at 7:09 AM, Jamie Johnson wrote:
>> 
>>> Is there a way to use dismax and spatial constraints?  I haven't seen how
>> to
>>> do this in the docs and only have seen a handful of questions on it.  I
>> have
>>> the same question for temporal based constraints.  What would a
>> solrconfig
>>> for this look like?
>> 
>> 
>> 
>> 
>> 
>> 



Re: Dismax + spatial constraints

2011-05-24 Thread Jamie Johnson
ok, so anything that goes in q would then be used for dismax but anything
else could go into fq (or multiple fqs) to apply different criteria in
addition then correct?

On Tue, May 24, 2011 at 9:43 AM, Smiley, David W.  wrote:

> Hi Jamie.
>
> You can definitely use dismax & geospatial; these are unrelated.  Use
> defType=dismax to get dismax and then use an appropriate geospatial filter
> like fq={!bbox}&sfield=store&pt=45.15,-93.85&d=5
>
> For temporal based constraints, add a temporal filter query:
> fq=timestamp:[NOW-1MONTH TO NOW]
>
> ~ David Smiley
> Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>
> On May 24, 2011, at 7:09 AM, Jamie Johnson wrote:
>
> > Is there a way to use dismax and spatial constraints?  I haven't seen how
> to
> > do this in the docs and only have seen a handful of questions on it.  I
> have
> > the same question for temporal based constraints.  What would a
> solrconfig
> > for this look like?
>
>
>
>
>
>


custom highlighting

2011-05-24 Thread dan sutton
Hi,

I'd like to make the highlighting work as follows:

length(all snippits) approx. 200 chars
hl.snippits = 2 (2 snippits)

e.g. if there is  onyl 1 snippet available, length <= 200chars
e.g. if there is >1 snippet, length each snippet == 100chars, so I
take the first 2 and get 200 chars

Is this possible with the regex fragmenter?

Or does anyone know of any contrib fragmenter that might do this?

Many thanks
Dan


Index content behind siteminder

2011-05-24 Thread Thumuluri, Sai
Good morning, I am trying to index some PDFs which are protected by
siteminder, any ideas as to how I can go about it? I am using Solr 1.4



Re: Dismax + spatial constraints

2011-05-24 Thread Smiley, David W.
Hi Jamie.

You can definitely use dismax & geospatial; these are unrelated.  Use 
defType=dismax to get dismax and then use an appropriate geospatial filter like 
fq={!bbox}&sfield=store&pt=45.15,-93.85&d=5

For temporal based constraints, add a temporal filter query: 
fq=timestamp:[NOW-1MONTH TO NOW]

~ David Smiley
Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/

On May 24, 2011, at 7:09 AM, Jamie Johnson wrote:

> Is there a way to use dismax and spatial constraints?  I haven't seen how to
> do this in the docs and only have seen a handful of questions on it.  I have
> the same question for temporal based constraints.  What would a solrconfig
> for this look like?







Re: how to convert YYYY-MM-DD to YYY-MM-DD hh:mm:ss - DIH

2011-05-24 Thread stockii
yes. 
thx for your help =)

-
--- System 

One Server, 12 GB RAM, 2 Solr Instances, 7 Cores, 
1 Core with 31 Million Documents other Cores < 100.000

- Solr1 for Search-Requests - commit every Minute  - 5GB Xmx
- Solr2 for Update-Request  - delta every Minute - 4GB Xmx
--
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-convert--MM-DD-to-YYY-MM-DD-hh-mm-ss-DIH-tp2961481p2979765.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Spatial Solr 3.1: filter by viewport

2011-05-24 Thread Smiley, David W.
Hi Zac.

The syntax in your example is odd, I didn't know you could do that. Except it 
doesn't quite work as you show. You could file a bug. As an alternative that 
might suffice, use the point-radius arguments in which Solr will take the 
minimum-bounding-box for.  See {!bbox}
http://wiki.apache.org/solr/SpatialSearch#bbox_-_Bounding-box_filter

You can expect to see great improvements in geospatial for 4.0.

~ David

On May 23, 2011, at 12:33 AM, Zac Smith wrote:

> How would I specify a filter that covered a rectangular viewport? I have 4 
> coordinate points for the corners and I want to return everything inside that 
> area.
> My first naive attempt was this:
> q=*:*&fq=coords:[44.119141,-125.948638 TO 47.931066,-111.029205]
> 
> At first this seems to work OK, except where the viewport crosses over a 
> point where the longitude goes from a positive value to a negative value.
> 
> Thanks
> Zac



Re: Results with and without whitspace(soccer club and soccerclub)

2011-05-24 Thread roySolr
Ok, I will do it with synonyms. 

What does the list look like?

soccerclub,soccer club

The index looks like this:

Manchester united soccerclub
Chelsea soccer club

I want them both in my results if i search for "soccer club" or
"soccerclub".
How can i configure this in schema.xml?

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Results-with-and-without-whitespace-soccer-club-and-soccerclub-tp2934742p2979577.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: spellcheck.collate returning all results

2011-05-24 Thread Richard Hodsdon
Hi,

Thanks this did the trick.
I am using SOLR 3.1, so I did not need to apply the first patch.

Richard

--
View this message in context: 
http://lucene.472066.n3.nabble.com/spellcheck-collate-returning-all-results-tp2975621p2979560.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr Highlight Component

2011-05-24 Thread Mike Sokolov
A possible workaround is to re-fetch the documents in your result set 
with a query that is:


+id=(id1 or id2 or ... id20) ()

where id1..20 are the doc ids in your result set

would require two round-trips though

-Mike

On 05/24/2011 08:19 AM, Koji Sekiguchi wrote:

(11/05/24 20:56), Lord Khan Han wrote:

Hi ,

Can I limit the terms that the HighlightComponent uses. My query is
generally long and I want specific ones to be highlighted and the 
rest is
not highlighted. Is there an option like the SpellCheckComponent. it 
uses q

unless spellcheck.q if specified. Is  a hl.q parameter possible?


No, but hl.q was proposed by me a year ago:

https://issues.apache.org/jira/browse/SOLR-1926

I'm sorry but no progress is there at this moment.

koji


Re: how to convert YYYY-MM-DD to YYY-MM-DD hh:mm:ss - DIH

2011-05-24 Thread Gora Mohanty
On Tue, May 24, 2011 at 5:36 PM, stockii  wrote:
> i am so an IDIOT !!! SORRRYY XD hehe
>
> i wrote "zeroDateTimeBehavOIr" and not "zeroDateTimeBehavior"
[...]

Heh! So, everything OK, now?

Regards,
Gora

P.S. I did ask about this earlier in the thread :-)


Re: Solr Highlight Component

2011-05-24 Thread Koji Sekiguchi

(11/05/24 20:56), Lord Khan Han wrote:

Hi ,

Can I limit the terms that the HighlightComponent uses. My query is
generally long and I want specific ones to be highlighted and the rest is
not highlighted. Is there an option like the SpellCheckComponent. it uses q
unless spellcheck.q if specified. Is  a hl.q parameter possible?


No, but hl.q was proposed by me a year ago:

https://issues.apache.org/jira/browse/SOLR-1926

I'm sorry but no progress is there at this moment.

koji
--
http://www.rondhuit.com/en/


Dynamic facet field

2011-05-24 Thread roySolr
Hello,

I have some problem with dynamic facets. I have a database with 1mil.
products and have indexed this with DIH.

Now i have facets that are connected to one category of products. Example:

Category   Facet
Television   type(hd,plasma), Inches(38,42), Color(black,grey)
Mobile phone  brand(HTC,APPLE), OS(android,ios,bb) 

When a user search for television i want this facets:

Type
hd(203)
plasma(32)

Inches
42(39)
38(213)

Color
black(200)
grey(30)

URL
facet.field=type&facet.field=inches&facet.field=color

Now i get from another db the titles of the facets that i want for this
category and use it in the URL(i don't want this anymore) 

I have dynamic fields to fill the
index(type_facet,inches_facet,color_facet). I thought maybe something like
this is possible:

facet.field=*_facet
All the fields with _facet will be a faceted??






--
View this message in context: 
http://lucene.472066.n3.nabble.com/Dynamic-facet-field-tp2979407p2979407.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: how to convert YYYY-MM-DD to YYY-MM-DD hh:mm:ss - DIH

2011-05-24 Thread stockii
i am so an IDIOT !!! SORRRYY XD hehe

i wrote "zeroDateTimeBehavOIr" and not "zeroDateTimeBehavior" 

...

-
--- System 

One Server, 12 GB RAM, 2 Solr Instances, 7 Cores, 
1 Core with 31 Million Documents other Cores < 100.000

- Solr1 for Search-Requests - commit every Minute  - 5GB Xmx
- Solr2 for Update-Request  - delta every Minute - 4GB Xmx
--
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-convert--MM-DD-to-YYY-MM-DD-hh-mm-ss-DIH-tp2961481p2979386.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr Highlight Component

2011-05-24 Thread Lord Khan Han
Hi ,

Can I limit the terms that the HighlightComponent uses. My query is
generally long and I want specific ones to be highlighted and the rest is
not highlighted. Is there an option like the SpellCheckComponent. it uses q
unless spellcheck.q if specified. Is  a hl.q parameter possible?


Or any other tricky way to workaround ..


PS: I need this tomorrow (hopefully) to show my boss insisting some other
stupid well known  commercial search engines..


Regards


Re: WELCOME to solr-user@lucene.apache.org

2011-05-24 Thread Lord Khan Han
Hi ,

   Can I limit the terms that the HighlightComponent uses. My query is
generally long and I want specific ones to be highlighted and the rest is
not highlighted. Is there an option like the SpellCheckComponent. it uses q
unless spellcheck.q if specified. Is  a hl.q parameter possible?


Or any other tricky way to workaround ..


PS: I need this tomorrow (hopefully) to show my boss insisting some other
stupid well known  commercial search engines..


Regards


Re: how to convert YYYY-MM-DD to YYY-MM-DD hh:mm:ss - DIH

2011-05-24 Thread stockii
new error message: 

-00-00^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@'
can not be represented as java.sql.Date

 ??? what ist that ???

-
--- System 

One Server, 12 GB RAM, 2 Solr Instances, 7 Cores, 
1 Core with 31 Million Documents other Cores < 100.000

- Solr1 for Search-Requests - commit every Minute  - 5GB Xmx
- Solr2 for Update-Request  - delta every Minute - 4GB Xmx
--
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-convert--MM-DD-to-YYY-MM-DD-hh-mm-ss-DIH-tp2961481p2979337.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: how to convert YYYY-MM-DD to YYY-MM-DD hh:mm:ss - DIH

2011-05-24 Thread stockii
SELECT CONCAT('tablename_', CAST(cp.id AS CHAR)) AS uniquekey,
cp.id,
cp.fieldname ..,
mp.fieldname,
mp. 
FROM consumer AS cp 
INNER JOIN morepush AS mp
ON cp.id = mp.id 

in my "query" is a "norma" JOIN select.

-
--- System 

One Server, 12 GB RAM, 2 Solr Instances, 7 Cores, 
1 Core with 31 Million Documents other Cores < 100.000

- Solr1 for Search-Requests - commit every Minute  - 5GB Xmx
- Solr2 for Update-Request  - delta every Minute - 4GB Xmx
--
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-convert--MM-DD-to-YYY-MM-DD-hh-mm-ss-DIH-tp2961481p2979311.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Highlighting in solr

2011-05-24 Thread Darren Govoni
You should be able to retrieve the snippets in your search engine and
combine or format
them however you like before returning the results to your client Right?

So in your middle tier, you invoke solr with a search, get the results,
retrieve the snippets,
iterate over them and format to your needs, then return it. That's
basically what I do for mine.


On Tue, 2011-05-24 at 16:38 +0530, Vignesh Raj wrote:

> Hi,
> 
> I use Solrnet to develop a search engine. In my application, I have a field
> called file_contents which I use for highlighting. Am able to get the
> highlights without a problem. Now I need to format it. For example, if the
> keyword occurs multiple times in the field, I have to display it lime what
> google does. May be like this.
> 
> GSMArena.com: Toshiba GSM cellphones. ... Toshiba phones. Toshiba. Filters.
> Available . Coming soon . Smartphone . Touchscreen . Camera . Bluetooth .
> Wi-Fi ...
> 
> Multiple snippets here are separated by "...". 
> 
> I need to achieve something like this. Am able to get multiple snippets. But
> how do I deal with the separating?
> 
> Regards
> 
> Vignesh
> 
>  
> 




Re: how to convert YYYY-MM-DD to YYY-MM-DD hh:mm:ss - DIH

2011-05-24 Thread Gora Mohanty
On Tue, May 24, 2011 at 1:03 PM, stockii  wrote:
> okay, thx =)
[...]

So, which version of Solr are you using? Just tried this with
Solr 1.4, and things seem to work as expected for me. Here
is what I did:
* Inserted a zero value into a mysql date field called testdate
  (also tried with datetime field). A select shows me "-00-00",
  as expected.
* Used DIH, with:
  - 
   
   ...

  - schema.xml has

  - Running dataimport works fine, and gives me a document
with no value for "testdate" (expected, as we are setting it
to NULL.

I suspect the problem is elsewhere. Could you share the
SELECT statement in the query attribute of your entit?

Regards,
Gora


Dismax + spatial constraints

2011-05-24 Thread Jamie Johnson
Is there a way to use dismax and spatial constraints?  I haven't seen how to
do this in the docs and only have seen a handful of questions on it.  I have
the same question for temporal based constraints.  What would a solrconfig
for this look like?


Highlighting in solr

2011-05-24 Thread Vignesh Raj
Hi,

I use Solrnet to develop a search engine. In my application, I have a field
called file_contents which I use for highlighting. Am able to get the
highlights without a problem. Now I need to format it. For example, if the
keyword occurs multiple times in the field, I have to display it lime what
google does. May be like this.

GSMArena.com: Toshiba GSM cellphones. ... Toshiba phones. Toshiba. Filters.
Available . Coming soon . Smartphone . Touchscreen . Camera . Bluetooth .
Wi-Fi ...

Multiple snippets here are separated by "...". 

I need to achieve something like this. Am able to get multiple snippets. But
how do I deal with the separating?

Regards

Vignesh

 



Re: Including Score in Solr POJO

2011-05-24 Thread Anuj Kumar
Hi,

I have not tried that but if you add a field annotation for "score" in your
POJO and set the query object to include the score.
Doesn't it populate the POJOs score field?

Are you using-
http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/beans/DocumentObjectBinder.html
for appropriate mapping between the fields of SolrDocument and POJOs?

Please try that. In the meantime, I will give it a shot.

Regards,
Anuj

On Tue, May 24, 2011 at 2:17 PM, Kissue Kissue  wrote:

> Hi Anuj,
>
> Thanks for your response. I am actually doing a bean search so am  doing
> the
> following:
>
>SolrQuery solrQuery = new SolrQuery(query);
>QueryResponse response = solr.query(solrQuery);
>List beans = response.getBeans(Product.class);
>
> It is not immediately clear to me how to get the score doing a bean search.
>
> Thanks.
>
> On Mon, May 23, 2011 at 4:47 PM, Anuj Kumar  wrote:
>
> > Hi,
> >
> > On Mon, May 23, 2011 at 8:52 PM, Kissue Kissue 
> > wrote:
> >
> > > Thanks Anuj for your reply. Would it then include it as a field in my
> > POJO?
> > >
> >
> > I meant the score given by Solr in response to the search query. Is it an
> > application specific score that you want to include?
> >
> >
> > > How do i define such field? I have a POJO with the @Field annotation
> > which
> > > is mapped to fields in my schema.
> > >
> >
> > At the time of indexing, you need not specify the score. The score is
> > calculated based on the relevance of the query against the matched
> > documents. If you have an application specific score or weight that you
> > want
> > to add, you can add it as a separate field but what I understand from
> your
> > query is that you want the score that Solr gives to each search results.
> In
> > that case, just setting the property IncludeScore to true while
> > constructing
> > the query object (as shown in the example that I gave earlier) will
> > suffice.
> >
> > From the query response, you can then query for the maximum score, as
> well
> > as each document's score. For example-
> >
> > // get the response
> > QueryResponse results = getSearchServer().query(query);
> > // get the documents
> > SolrDocumentList resultDocs = results.getResults();
> > // get the maximum score
> > float maxScore = resultDocs.getMaxScore();
> > // iterate through the documents to see the results
> > for(SolrDocument doc : resultDocs){
> > // get the score
> > Object score = doc.get("score");
> > }
> >
> > Hope that helps.
> >
> > Regards,
> > Anuj
> >
> > >
> > > Thanks.
> > >
> > > On Mon, May 23, 2011 at 4:10 PM, Anuj Kumar 
> wrote:
> > >
> > > > Hi,
> > > >
> > > > If you mean SolrJ (as I understand by your description of POJOs), you
> > can
> > > > add the score by setting the property IncludeScore to true. For
> > example-
> > > >
> > > > SolrQuery query = new SolrQuery().
> > > >setQuery(keyword).
> > > >  *setIncludeScore(true);*
> > > >
> > > > Regards,
> > > > Anuj
> > > >
> > > > On Mon, May 23, 2011 at 8:31 PM, Kissue Kissue 
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I am currently using Solr and indexing/reading my documents as
> POJO.
> > > The
> > > > > question i have is how can i include the score in the POJO for each
> > > > > document
> > > > > found in the index?
> > > > >
> > > > > Thanks.
> > > > >
> > > >
> > >
> >
>


parentDeltaQuery

2011-05-24 Thread Romi
Hi, i am new to solr and i m trying some examples to fetch data from MySql to
solr server.I want to know what is parentDeltaQuery, when should it b used,
what is its advantage. please refer me some good example.

-
Romi
--
View this message in context: 
http://lucene.472066.n3.nabble.com/parentDeltaQuery-tp2979110p2979110.html
Sent from the Solr - User mailing list archive at Nabble.com.


auto-completion with suggester and spellchecking

2011-05-24 Thread Jean-Claude Dauphin
Hi,
I would like to get  suggestions that correspond  to spelling correction in
case there are typing mistakes in the typed characters. I found a similar
post but with no answer
http://lucene.472066.n3.nabble.com/Solr-suggester-and-spell-checker-td2326907.html


And I have some questions about how to use Solr suggester component for
autocompletion and spellchecking at the same time.

1) Does Solr can use the same spellcheck dictionary (that is based upon the
main index) for autocompletion and spellchecking?

2) In solrconfig.xml, should I configure a "suggest" search Component AND a
"spellcheck" component? OR a single search component would be sufficient?
any example of configuration would be appreciated.

3) Which parameters should be used in the query?
I
The following query:

http://localhost:8983/solr/position/suggest?q=ing&qt=/suggest&onlyMorePopular=true
returns no suggestions in case of typing mistake.

Thank you in advance for yr time

Best wishes


-- 
Jean-Claude Dauphin

jc.daup...@gmail.com
jc.daup...@afus.unesco.org

http://kenai.com/projects/j-isis/
http://www.unesco.org/isis/
http://www.unesco.org/idams/
http://www.greenstone.org


Re: Including Score in Solr POJO

2011-05-24 Thread Kissue Kissue
Hi Anuj,

Thanks for your response. I am actually doing a bean search so am  doing the
following:

SolrQuery solrQuery = new SolrQuery(query);
QueryResponse response = solr.query(solrQuery);
List beans = response.getBeans(Product.class);

It is not immediately clear to me how to get the score doing a bean search.

Thanks.

On Mon, May 23, 2011 at 4:47 PM, Anuj Kumar  wrote:

> Hi,
>
> On Mon, May 23, 2011 at 8:52 PM, Kissue Kissue 
> wrote:
>
> > Thanks Anuj for your reply. Would it then include it as a field in my
> POJO?
> >
>
> I meant the score given by Solr in response to the search query. Is it an
> application specific score that you want to include?
>
>
> > How do i define such field? I have a POJO with the @Field annotation
> which
> > is mapped to fields in my schema.
> >
>
> At the time of indexing, you need not specify the score. The score is
> calculated based on the relevance of the query against the matched
> documents. If you have an application specific score or weight that you
> want
> to add, you can add it as a separate field but what I understand from your
> query is that you want the score that Solr gives to each search results. In
> that case, just setting the property IncludeScore to true while
> constructing
> the query object (as shown in the example that I gave earlier) will
> suffice.
>
> From the query response, you can then query for the maximum score, as well
> as each document's score. For example-
>
> // get the response
> QueryResponse results = getSearchServer().query(query);
> // get the documents
> SolrDocumentList resultDocs = results.getResults();
> // get the maximum score
> float maxScore = resultDocs.getMaxScore();
> // iterate through the documents to see the results
> for(SolrDocument doc : resultDocs){
> // get the score
> Object score = doc.get("score");
> }
>
> Hope that helps.
>
> Regards,
> Anuj
>
> >
> > Thanks.
> >
> > On Mon, May 23, 2011 at 4:10 PM, Anuj Kumar  wrote:
> >
> > > Hi,
> > >
> > > If you mean SolrJ (as I understand by your description of POJOs), you
> can
> > > add the score by setting the property IncludeScore to true. For
> example-
> > >
> > > SolrQuery query = new SolrQuery().
> > >setQuery(keyword).
> > >  *setIncludeScore(true);*
> > >
> > > Regards,
> > > Anuj
> > >
> > > On Mon, May 23, 2011 at 8:31 PM, Kissue Kissue 
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I am currently using Solr and indexing/reading my documents as POJO.
> > The
> > > > question i have is how can i include the score in the POJO for each
> > > > document
> > > > found in the index?
> > > >
> > > > Thanks.
> > > >
> > >
> >
>


Sorting count

2011-05-24 Thread Daniel Persson
Hi.

Using solr 1.4.0 is there any way to sort fields depending on counted
multi-value fields?

At the moment i use a sort statement like

catalog_id desc, score desc

the statement i want to use is more like

count(catalog_id) desc, score desc

I want the results that are present in a larger amount of catalogs to be
sorted higher.

I could solve it by rebuilding the index with a catalog_count. Just curious
is this function, or something like it is present?

Best regards

Daniel


What is document tag in data-config.xml of Solr

2011-05-24 Thread Romi
Hi, I am working with solr server. i want to fetch data from MySQL database
to solr. the following is the db-data-config.xml:




 

 



i want to know what tag indicates here, can we give more then one
tag here, if possible please refer me some good example 

-
Romi
--
View this message in context: 
http://lucene.472066.n3.nabble.com/What-is-document-tag-in-data-config-xml-of-Solr-tp2978668p2978668.html
Sent from the Solr - User mailing list archive at Nabble.com.


JdbcDataSource isolation lelel

2011-05-24 Thread Romi
Hi, i am fetching data from mysql database to solr for indexing. i want to
know what is the default isolation level in jdbcdatasource connection. 

-
Romi
--
View this message in context: 
http://lucene.472066.n3.nabble.com/JdbcDataSource-isolation-lelel-tp2978664p2978664.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: how to convert YYYY-MM-DD to YYY-MM-DD hh:mm:ss - DIH

2011-05-24 Thread stockii
okay, thx =) 

-
--- System 

One Server, 12 GB RAM, 2 Solr Instances, 7 Cores, 
1 Core with 31 Million Documents other Cores < 100.000

- Solr1 for Search-Requests - commit every Minute  - 5GB Xmx
- Solr2 for Update-Request  - delta every Minute - 4GB Xmx
--
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-convert--MM-DD-to-YYY-MM-DD-hh-mm-ss-DIH-tp2961481p2978639.html
Sent from the Solr - User mailing list archive at Nabble.com.