Re: solr search

2008-05-16 Thread dharhsana


hi umar, thanks for ur reply ...

As per ur sugesstion i have  done the search,it perfectly worked well... 

i have  two more question 
1) how to delete an id in a solr 

i tried some example but there is no changes in my index.

2) How to use an Analyzer for querying and indexing, for example i have
indexed java1.5,java1.6,java in the index, while iam searching i entered a
query like "what is java", it is not fetching any results ,but only if i
give java or java is object oriented language something like that only i can
see the result. I have no idea of what analyser i have to use.

waiting for ur reply,

Thank u.

with regards 
Rekha.


-- 
View this message in context: 
http://www.nabble.com/solr-search-tp17249602p17273000.html
Sent from the Solr - User mailing list archive at Nabble.com.



RE: solr search

2008-05-16 Thread Tim Mahy
Hi,

1) did you perform a commit after the delete ?
2) in the default schema there are some comments on the different analyzers 
which should help you get started I think

greetings,
Tim

Van: dharhsana [EMAIL PROTECTED]
Verzonden: vrijdag 16 mei 2008 13:56
Aan: solr-user@lucene.apache.org
Onderwerp: Re: solr search

hi umar, thanks for ur reply ...

As per ur sugesstion i have  done the search,it perfectly worked well...

i have  two more question
1) how to delete an id in a solr 

i tried some example but there is no changes in my index.



2) How to use an Analyzer for querying and indexing, for example i have
indexed java1.5,java1.6,java in the index, while iam searching i entered a
query like "what is java", it is not fetching any results ,but only if i
give java or java is object oriented language something like that only i can
see the result. I have no idea of what analyser i have to use.

waiting for ur reply,

Thank u.

with regards
Rekha.


--
View this message in context: 
http://www.nabble.com/solr-search-tp17249602p17273000.html
Sent from the Solr - User mailing list archive at Nabble.com.





Please see our disclaimer, http://www.infosupport.be/Pages/Disclaimer.aspx


Re: solr search

2008-05-16 Thread Umar Shah
On Fri, May 16, 2008 at 5:26 PM, dharhsana <[EMAIL PROTECTED]>
wrote:

>
>
> hi umar, thanks for ur reply ...
>
> As per ur sugesstion i have  done the search,it perfectly worked well...
>
> i have  two more question
> 1) how to delete an id in a solr 
>
http://wiki.apache.org/solr/UpdateXmlMessages?highlight=%28update%29

in ur schema.xml, there would be some field named id that is unique and
identifies  the document record in the index.
if u have changed that name to something specific to ur example use the same
name in the command
to delet all the record you can use :

*:*
message to delete the documents from the index...
u can replace *:* with some other legitimate solr query to do a
selective delete.





> i tried some example but there is no changes in my index.
>
> 2) How to use an Analyzer for querying and indexing, for example i have
> indexed java1.5,java1.6,java in the index, while iam searching i entered a
> query like "what is java", it is not fetching any results ,but only if i
> give java or java is object oriented language something like that only i
> can
> see the result. I have no idea of what analyser i have to use.
>

use the default schema.xml
if u want to match the exact phrase use the field type string
if you want  loose text match  use the fieldtype text
these come with predefined analyzer configurations for the purpose.

However if you are looking out for soem thing special go thrugh the entire
file and i'm sure you will find lots of info in the xml file itself.


cheers,
-umar

>
> waiting for ur reply,
>
> Thank u.
>
> with regards
> Rekha.
>
>
> --
> View this message in context:
> http://www.nabble.com/solr-search-tp17249602p17273000.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>


Re: Commit problems on Solr 1.2 with Tomcat

2008-05-16 Thread Yonik Seeley
Don't rely on looking at the files in the index directory to tell if
an optimize has been performed.

http://www.nabble.com/what%27s-up-with%3A-java--Ddata%3Dargs--jar-post.jar-%22%3Coptimize-%3E%22-to16162870.html#a16179673

-Yonik

On Fri, May 16, 2008 at 12:00 AM, Eason. Lee <[EMAIL PROTECTED]> wrote:
> similar problem I met before was using the  operation
> The first time I sent  to solr , the optimize operation did have
> down.
> But files  were not merged. When i sent another  to solr, all the
> files were merged.
> This seems to happen just in Windows
>
>
> 2008/5/13, Yonik Seeley <[EMAIL PROTECTED]>:
>>
>> Is SendSolrIndexingRequest synchronous or asynchronous?
>> If the call to SendSolrIndexingRequest() can return before the
>> response from the add is received, then the commit could sneak in and
>> finish *before* the add is done (in which case, you won't see it
>> before the next commit).
>>
>> -Yonik
>>
>> On Tue, May 13, 2008 at 10:49 AM, William Pierce <[EMAIL PROTECTED]>
>> wrote:
>> > Erik:  I am indeed issuing multiple Solr requests.
>> >
>> >  Here is my code snippet (deletexml and addxml are the strings that
>> contain
>> > the  and  strings for the items to be added or deleted).
>> For
>> > our simple example,  nothing is being deleted so "stufftodelete" is
>> always
>> > false.
>> >
>> > //we are done...we now need to post the requests...
>> >if (stufftodelete)
>> >{
>> >SendSolrIndexingRequest(deletexml);
>> >}
>> >if (stufftoadd)
>> >{
>> >SendSolrIndexingRequest(addxml);
>> >}
>> >
>> >if ( stufftodelete || stufftoadd)
>> >{
>> >SendSolrIndexingRequest("> > waitSearcher=\"true\"/>");
>> >}
>> >
>> >  I am using the full form of the commit here just to see if the > />
>> > was somehow not working.
>> >
>> >  The SendSolrIndexingRequest is the routine that takes the string
>> argument
>> > and issues the POST request to the update URL.
>> >
>> >  Thanks,
>> >
>> >  Bill
>> >
>> >  --
>> >  From: "Erik Hatcher" <[EMAIL PROTECTED]>
>> >  Sent: Tuesday, May 13, 2008 7:40 AM
>> >
>> >
>> >  To: 
>> >  Subject: Re: Commit problems on Solr 1.2 with Tomcat
>> >
>> >
>> > > I'm not sure if you are issuing a separate  _request_
>> after  your
>> > , or putting a  into the same request.  Solr only  supports
>> > one command (add or commit, but not both) per request.
>> > >
>> > > Erik
>> > >
>> > >
>> > > On May 13, 2008, at 10:36 AM, William Pierce wrote:
>> > >
>> > >
>> > > > Thanks for the comments
>> > > >
>> > > > The reason I am just adding one document followed by a commit is  for
>> > this particular test --- in actuality,  I will be loading  documents from
>> a
>> > db. But thanks for the pointer on the ?commit=true  on the add command.
>> > > >
>> > > > Now on the  problem itself,  I am still confused:   Doesn't
>> > the commit count of 1 indicate that the commit is completed?
>> > > >
>> > > > In any event,  just for testing purposes,  I started everything  from
>> > scratch (deleted all documents, stopped/restarted tomcat).  I  noticed
>> that
>> > the only files in my index folder were:  segments.gen  and segments_1.
>> > > >
>> > > > Then I did the add followed by  and noticed that
>> there  were
>> > now three files:  segments.gen, segments_1 and write.lock.
>> > > >
>> > > > Now it is 7 minutes later, and when I query the index using the
>> > "http://localhost:59575/splus1/admin/"; url, I still do not see the
>> document.
>> > > >
>> > > > Again, when I issue another  command everything seems to
>> > work. Why are TWO commit commands apparently required?
>> > > >
>> > > > Thanks,
>> > > >
>> > > > Sridhar
>> > > >
>> > > > --
>> > > > From: "Yonik Seeley" <[EMAIL PROTECTED]>
>> > > > Sent: Tuesday, May 13, 2008 6:42 AM
>> > > > To: 
>> > > > Subject: Re: Commit problems on Solr 1.2 with Tomcat
>> > > >
>> > > >
>> > > > > By default, a commit won't return until a new searcher has been
>> > opened
>> > > > > and the results are visible.
>> > > > > So just make sure you wait for the commit command to return before
>> > querying.
>> > > > >
>> > > > > Also, if you are committing every add, you can avoid a separate
>> > commit
>> > > > > command by putting ?commit=true in the URL of the add command.
>> > > > >
>> > > > > -Yonik
>> > > > >
>> > > > > On Tue, May 13, 2008 at 9:31 AM, Alexander Ramos Jardim
>> > > > > <[EMAIL PROTECTED]> wrote:
>> > > > >
>> > > > > > Maybe a delay in commit? How may time elapsed between commits?
>> > > > > >
>> > > > > >  2008/5/13 William Pierce <[EMAIL PROTECTED]>:
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >  > Hi,
>> > > > > >  >
>> > > > > >  > I am having problems with Solr 1.2 running tomcat
>> version  6.0.16
>> > (I also
>> > > > > >  > tried 6.0.14 but same problems exis

Re: Searching "inside of words"

2008-05-16 Thread Daniel Löfquist

Sorry for taking forever to reply but anyway...

We're using Solr-1.2.0 and can't for various reasons use the 
Nightly-version.
The 1.2.0-version doesn't have NGramFilterFactory and 
EdgeNGramFilterFactory so the only ones I can utilize are 
EdgeNGramTokenizerFactory and NGramTokenizerFactory.


I've done some playing around with them but the best result I've gotten 
so far is a field-type that enables searching for specific letters, for 
example I can search for an item that contains the letters a and x, but 
it returns a hit no matter where these letters are in the text, they 
don't have to be next to each other, and that's not the result I was 
going for. If the field contains "monitor" I want a hit on a search for 
"onit" but not on "rint" for example.


I've never attempted to construct a new field-type of my own before and 
I'm finding the available documentation somewhat incomplete and not very 
helpful so I really need some pointers from people who know better than 
me here.
If anyone could help me out maybe even with some example-code I'd be 
eternally grateful.


//Daniel


Otis Gospodnetic wrote:

Hi Daniel,
Well, searching "inside of words" requires special treatment, because normally 
searches work on words/terms/tokens.

Make use of the following:
$ ff \*NGram\*java
./src/java/org/apache/solr/analysis/EdgeNGramTokenizerFactory.java
./src/java/org/apache/solr/analysis/NGramTokenizerFactory.java
./src/java/org/apache/solr/analysis/NGramFilterFactory.java
./src/java/org/apache/solr/analysis/EdgeNGramFilterFactory.java

Use these to create a new field type make Solr tokenize and index your terms as, say, uni-grams.  
Instead (or in addition to) indexing "Termobyxa", index "T e r m o b y x a".  
Do the same with the query-time analyzer, and you'll be able to search within words.
 
Otis

--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch

- Original Message 
From: Daniel Löfquist <[EMAIL PROTECTED]>
To: solr-user@lucene.apache.org
Sent: Thursday, April 17, 2008 5:46:15 AM
Subject: Searching "inside of words"

Hi,

I'm still pretty new to Solr. We're using it for searching on our site 
right now though.


The configuration is however pretty much based on the example-files that 
come with Solr and there's one type of search that I can't get to work.


Each item has fields called "title" and "description", both of which are 
of type "text".


The type "text" is defined like this in our schema.xml :




words="stopwords.txt"/>
generateNumberParts="1" catenateWords="1" catenateNumbers="1" 
catenateAll="0"/>







ignoreCase="true" expand="true"/>
words="stopwords.txt"/>
generateNumberParts="1" catenateWords="0" catenateNumbers="0" 
catenateAll="0"/>







My problem is that if I have an item with "title"="Termobyxa", a search 
for "Termo" gives me a hit but if I search for "ermo" or "byxa" I get no 
hit. How do I make it so that this kind of search "inside a word" 
returns a hit?


Sincerely,

Daniel Löfquist






--
Daniel Löfquist
Application Manager / Software Engineer

CDON.COM
Bergsgatan 20, Box 385, SE 201 23 Malmö, Sweden

Office: +46 40 601 61 00
Direct: +46 40 601 61 16
Mobile: +46 702 92 21 75
Fax: +46 40 601 61 20
E-mail: [EMAIL PROTECTED] 

CDON.COM 

Confidentiality
Information contained in this e-mail is intended for the use of the
addressee only, and is confidential. Any dissemination, distribution,
copying or use of this communication without prior permission of
the addressee is strictly prohibited. If you are not the intended
addressee you must delete this e-mail and its attachments.


hi umar

2008-05-16 Thread dharhsana

hi,thank u for ur reply..

As per ur suggestion ,the index has been deleted ,can you plz help me out
for deleting the index by 'ID' (but not the whole index).


For analyzer,i have given the text as the fileld name ,but i didnt get the
proper loose search

can u give me some more examples for analyzer...

waiting for ur reply,

with regards,
T.Rekha.
-- 
View this message in context: 
http://www.nabble.com/hi-umar-tp17276060p17276060.html
Sent from the Solr - User mailing list archive at Nabble.com.



RE: hi umar

2008-05-16 Thread Tim Mahy
Hi,

you can send a delete query, the delete query is the same syntax as a normal 
search.

so if your id field is called "ID"

you can send as query : ID:"1450"  instead of *:* (which deletes everything)
which will delete in this example the document with id 1450

greetings,
Tim

Van: dharhsana [EMAIL PROTECTED]
Verzonden: vrijdag 16 mei 2008 16:27
Aan: solr-user@lucene.apache.org
Onderwerp: hi umar

hi,thank u for ur reply..

As per ur suggestion ,the index has been deleted ,can you plz help me out
for deleting the index by 'ID' (but not the whole index).


For analyzer,i have given the text as the fileld name ,but i didnt get the
proper loose search

can u give me some more examples for analyzer...

waiting for ur reply,

with regards,
T.Rekha.
--
View this message in context: 
http://www.nabble.com/hi-umar-tp17276060p17276060.html
Sent from the Solr - User mailing list archive at Nabble.com.





Please see our disclaimer, http://www.infosupport.be/Pages/Disclaimer.aspx


bitwise comparer

2008-05-16 Thread Tim Mahy
Hi all,

is there any already existing patch or feature which allows to search bitwise ?

so like you would do in mysql : " myField & 5 "

which returns in this case all the documents which have myField values 4 and 1 ?

greetings,
Tim




Please see our disclaimer, http://www.infosupport.be/Pages/Disclaimer.aspx


Re: bitwise comparer

2008-05-16 Thread Otis Gospodnetic
Nope, not that I know of.

 Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch


- Original Message 
> From: Tim Mahy <[EMAIL PROTECTED]>
> To: "solr-user@lucene.apache.org" 
> Sent: Friday, May 16, 2008 11:34:08 AM
> Subject: bitwise comparer
> 
> Hi all,
> 
> is there any already existing patch or feature which allows to search bitwise 
> ?
> 
> so like you would do in mysql : " myField & 5 "
> 
> which returns in this case all the documents which have myField values 4 and 
> 1 ?
> 
> greetings,
> Tim


Multicore capability: dynamically creating 1000s of cores?

2008-05-16 Thread James Brady
Hi, there was some talk on JIRA about whether Multicore would be able  
to manage tens of thousands of cores, and dynamically create hundreds  
every day:
https://issues.apache.org/jira/browse/SOLR-350? 
focusedCommentId=12571282#action_12571282


The issue of multicore configuration was left open in SOLR-350 (I  
don't think a new issue was opened?), so it's not clear to me if what  
Otis described will be possible in the 1.3 timeframe.


Can anyone involved in SOLR-350 elaborate on how dynamic creation,  
closing and opening of cores will work in the future?


A real-world deployment of this would require associated admin tasks  
for each core too: setting up cron jobs, enabling and starting rsync  
and so on, so core configuration via Solr isn't a requirement for me:  
I can script the creation and configuration of a new core directory  
alongside the other admin tasks.


The open questions are whether I'll be able to notify Solr that there  
is a pre-configured core ready to be used - i.e. the configuration set  
in multicore.xml, and whether this multi-multi-core approach will  
scale to the levels that Otis mentioned.


Thanks!

James.

Re: Multi core weight

2008-05-16 Thread Jae Joo
Running multiple indivisual queries is one option, but because of the volume
of documents (14 millions) and traffic, 10 request per second, I am looking
the optimal way to do that.

Thanks,

Jae

On Thu, May 15, 2008 at 11:57 AM, Otis Gospodnetic <
[EMAIL PROTECTED]> wrote:

> Jae,
> It sounds like you are doing a distributed search across your 3 cores on a
> single Solr instance?  Why not do run 3 individual queries (parallel or
> serial, your choice) and pick however many hits you need from each result?
>
>  Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>
>
> - Original Message 
> > From: Jae Joo <[EMAIL PROTECTED]>
> > To: solr-user@lucene.apache.org
> > Sent: Thursday, May 15, 2008 9:07:54 AM
> > Subject: Multi core weight
> >
> > Hi,
> >
> > I am looking for "the best or possible" way to add WEIGHT to each core in
> > multi core environment.
> >
> > core 1 has about 10 millions articles from same publisher and core 2 and
> 3
> > have less than 10k.
> > I would like to have BALANCED Query result - ex. 10 from core 1, 10 from
> > core 2 and 10 from core 3..
> >
> > Thanks,
> >
> > Jae
>
>


Re: Multi core weight

2008-05-16 Thread Otis Gospodnetic
Jae,
Those numbers are not huge for modern type hardware.  Are you actually seeing 
performance problems?
That said, if you are simply spreading your 1 index on 1 server over N cores on 
the same 1 server, and that's what it sounds like, I am not sure if you are 
really benefiting.

 Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch


- Original Message 
> From: Jae Joo <[EMAIL PROTECTED]>
> To: solr-user@lucene.apache.org
> Sent: Friday, May 16, 2008 4:05:29 PM
> Subject: Re: Multi core weight
> 
> Running multiple indivisual queries is one option, but because of the volume
> of documents (14 millions) and traffic, 10 request per second, I am looking
> the optimal way to do that.
> 
> Thanks,
> 
> Jae
> 
> On Thu, May 15, 2008 at 11:57 AM, Otis Gospodnetic <
> [EMAIL PROTECTED]> wrote:
> 
> > Jae,
> > It sounds like you are doing a distributed search across your 3 cores on a
> > single Solr instance?  Why not do run 3 individual queries (parallel or
> > serial, your choice) and pick however many hits you need from each result?
> >
> >  Otis
> > --
> > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
> >
> >
> > - Original Message 
> > > From: Jae Joo 
> > > To: solr-user@lucene.apache.org
> > > Sent: Thursday, May 15, 2008 9:07:54 AM
> > > Subject: Multi core weight
> > >
> > > Hi,
> > >
> > > I am looking for "the best or possible" way to add WEIGHT to each core in
> > > multi core environment.
> > >
> > > core 1 has about 10 millions articles from same publisher and core 2 and
> > 3
> > > have less than 10k.
> > > I would like to have BALANCED Query result - ex. 10 from core 1, 10 from
> > > core 2 and 10 from core 3..
> > >
> > > Thanks,
> > >
> > > Jae
> >
> >



Re: SOLR-470 & default value in schema with NOW (update)

2008-05-16 Thread Chris Hostetter

: The problem appeared for me any time I tried to mix using the default 
: value NOW with any documents that had this data. That should be a 2 
: document set to recreate the problem if it is the case. I didn't try 
: that hard to isolate the problem, I just changed my data and removed the 
: default from the schema.

Hmmm, yeah i tried this simple 2 doc (actually three, X, X.000, and NOW) 
test and couldn't reproduce.

If you are interested the patch in SOLR-470 should make a lot of these 
problems go away ... it's much more forgiving about parsing milliseconds, 
and much more rigerous about producing the canonical form from date math 
expressions (like "NOW")


-Hoss



Re: Field Filtering that Varies per Query

2008-05-16 Thread Chris Hostetter

: The application that I am working on contains a directory of user
: profiles that acts a lot like a social networking site. Each user
: profile is composed of a set of fields (first_name, last_name, bio,
: phone_number, etc). Every user profile field is associated with a
: privacy setting that optionally hides the data inside of the field
: from other users. The privacy settings allow people to show the field
: to nobody, only their contacts on the site, all logged in users, or
: anyone.

it sounds like you need to denormalize your data more ... 

one possibility: instead of one document per "user" object, have one 
document per user object+sercurity level which contains only the 
indexed/stored fields that are available at that level.

Another possibility is to keep your one doc per user, but have one field 
per field+security level (ie first_name_anonymous, first_name_member, 
etc...)

A third possibility...

: created a query filter that was dynamic depending on the identity of
: the logged in user, that looked something like this for a query for
: the term secret:
: 
: (first_name: secret AND (first_name_contact:anonymous OR
: first_name_contact:member)) OR
: (last_name: secret AND (last_name_contact:anonymous OR
: last_name_contact:member)) OR
: 
: This was used as a filter query with a standard query for the search
: term secret performed on the resulting filtered set of documents. This
: worked great if the search was a single word. However, if the users'
: search query contained multiple terms - for instance,  'my secret'
: results might be inappropriately revealed. This is because matches

...perhaps you are just building your multi word queries poorly, if you 
show us what some examples of the full query structures looked like for 
"my secret" and give us some examples of docs where it should/shouldn't 
match maybe people can suggest a better way of structuring the query.




-Hoss



Re: [poll] Change logging to SLF4J?

2008-05-16 Thread Ken Krugler

Hoss has shamed me into taking a position on this.

I didn't vote earlier, because I have no real experience with SLF4J, 
other than indirectly via our use of Jetty.


But I do know that we'd have to do _something_ for logging when we 
switch to embedded Solr.


Under the hood we now use Log4J everywhere, so finishing up my 
earlier work on creating a JUL logger that bridged to Log4J was 
another option, but one I'd rather avoid.


So...


[ ] Keep solr logging as it is.  (JDK Logging)
[X] Use SLF4J.


-- Ken
--
Ken Krugler
Krugle, Inc.
+1 530-210-6378
"If you can't find it, you can't fix it"