Re: not equals query in solr

2011-08-24 Thread Ranveer Kumar
any help...

On Wed, Aug 24, 2011 at 12:58 PM, Ranveer Kumar wrote:

> Hi,
>
> is it right way to do :
> q=(state:[* TO *] AND city:[* TO *])
>
> regards
> Ranveer
>
>
> On Wed, Aug 24, 2011 at 12:54 PM, Ranveer Kumar wrote:
>
>> Hi All,
>>
>> How to do negative query in solr. Following are the criteria :
>> I have state and city field where I want to filter only those state and
>> city which is not blank. something like: state NOT "" AND city NOT "".
>> I tried -state:"" but its not working.
>>
>> Or suggest  me to do this in better way..
>>
>> regards
>> Ranveer
>>
>>
>>
>>
>


Re: Optimize requires 50% more disk space when there are exactly 20 segments

2011-08-24 Thread Lance Norskog
Which Solr version do you have? In 3.x and trunk, Tiered and
BalancedSegment are there for exactly this reason.

In Solr 1.4, your only trick is to do a partial optimize with
maxSegments. This lets you say "optimize until there are 15 segments,
then stop". Do this with smaller and smaller numbers.

On Wed, Aug 24, 2011 at 8:35 PM, Michael Ryan  wrote:
> I'm using Solr 3.2 with a mergeFactor of 10 and no merge policy configured, 
> thus using the default LogByteSizeMergePolicy.  Before I do an optimize, 
> typically the largest segment will be about 90% of the total index size.
>
> When I do an optimize, the total disk space required is usually about 2x the 
> index size.  But about 10% of the time, the disk space required is about 3x 
> the index size - when this happens, I see a very large segment created, 
> roughly the size of the original index size, followed by another slightly 
> larger segment.
>
> After some investigating, I found that this would happen when there were 
> exactly 20 segments in the index when the optimize started.  My hypothesis is 
> that this is a side-effect of the 20 segments being evenly divisible by the 
> mergeFactor of 10.  I'm thinking that when there are 20 segments, the largest 
> segment is being merged twice - first when merging the 20 segments down to 2, 
> then again when merging from 2 to 1.
>
> I would like to avoid this if at all possible, as it requires 50% more disk 
> space and takes almost twice as long to optimize.  Would using 
> TieredMergePolicy help me here, or some other config I can change?
>
> -Michael
>



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


Optimize requires 50% more disk space when there are exactly 20 segments

2011-08-24 Thread Michael Ryan
I'm using Solr 3.2 with a mergeFactor of 10 and no merge policy configured, 
thus using the default LogByteSizeMergePolicy.  Before I do an optimize, 
typically the largest segment will be about 90% of the total index size.

When I do an optimize, the total disk space required is usually about 2x the 
index size.  But about 10% of the time, the disk space required is about 3x the 
index size - when this happens, I see a very large segment created, roughly the 
size of the original index size, followed by another slightly larger segment.

After some investigating, I found that this would happen when there were 
exactly 20 segments in the index when the optimize started.  My hypothesis is 
that this is a side-effect of the 20 segments being evenly divisible by the 
mergeFactor of 10.  I'm thinking that when there are 20 segments, the largest 
segment is being merged twice - first when merging the 20 segments down to 2, 
then again when merging from 2 to 1.

I would like to avoid this if at all possible, as it requires 50% more disk 
space and takes almost twice as long to optimize.  Would using 
TieredMergePolicy help me here, or some other config I can change?

-Michael


Re: Query vs Filter Query Usage

2011-08-24 Thread Shawn Heisey

On 8/24/2011 6:07 PM, Joshua Harness wrote:

Shawn -

  Thanks for your reply. Given that my application is mainly used as
faceted search, would the following types of queries make sense or are there
other pitfalls to consider?

q=*:*&fq=someField:someValue&fq=anotherField:anotherValue


I'm no expert, but that looks like the perfect thing to do with filter 
queries.  One thing that you might want to think about and experiment 
with is removing someField and anotherField from the faceting when you 
issue a query like that.  It would likely work fine if you left them in, 
but there's not really a need to facet on a field that you've limited to 
a single value.


Thanks,
Shawn



Re: Getting DIH status with SolrJ

2011-08-24 Thread Shawn Heisey

On 8/24/2011 4:15 PM, Shawn Heisey wrote:
It might not be the prettiest code, but I'll take it.  Thank you.  I 
paraphrased quite a bit and have ended up with the following:


I put all this into a somewhat generic method.  Hopefully it will prove 
useful to someone else on the list.  There are some minimal comments to 
explain what it does:


/**
 * Gets the DataImportHandler status.
 *
 * @return Long.MIN_VALUE: an error occurred, or the import never 
started.
 * Negative value: Import in progress, invert the sign to 
see how

 * many documents added so far. Zero or positive value: Import
 * complete, total number of documents added.
 * @throws SolrServerException
 * @throws IOException
 */
public long getDIHStatus() throws SolrServerException, IOException
{
Long processed = null;
String tmpProcessed = null;
String tmpFetched = null;
String elapsed = null;
String aborted = null;
String msg = null;

SolrRequest req = new DirectXmlRequest("/dataimport", null);
NamedList nl = solrCore.request(req);

String status = (String) nl.get("status");
@SuppressWarnings("unchecked")
Map msgs = (Map) nl
.get("statusMessages");
if (msgs != null)
{
tmpProcessed = (String) msgs.get("Total Documents Processed");
tmpFetched = (String) msgs.get("Total Rows Fetched");
elapsed = (String) msgs.get("Time taken ");
aborted = (String) msgs.get("Aborted");
msg = (String) msgs.get("");
}

/**
 * The "Total Documents Processed" field disappears between the 
time the
 * actual import is done and the DIH finishes indexing, 
committing, and
 * optimizing. If it's not there, try to pull it from the "" 
field. As a

 * last-ditch effort, get the (possibly inaccurate) value from the
 * "Total Rows Fetched" field.
 */
if (tmpProcessed != null)
{
processed = Long.parseLong(tmpProcessed);
}
else if (msg != null)
{
/**
 * Pull up to two numbers out of the message. Example: Indexing
 * completed. Added/Updated: 370055 documents. Deleted 0 
documents.

 */
Pattern p = Pattern.compile("(\\d+)");
Matcher m = p.matcher(msg);
if (m.find())
{
tmpProcessed = m.group();
processed = Long.parseLong(tmpProcessed);
}
if (m.find())
{
tmpProcessed = m.group();
processed += Long.parseLong(tmpProcessed);
}
}
else if (tmpFetched != null)
{
processed = Long.parseLong(tmpFetched);
}

/**
 * All available info has been gathered from the response. Now 
we parse

 * what we have and determine the return value.
 */
if (aborted != null || processed == null)
{
return Long.MIN_VALUE;
}

if (status.equals("busy"))
{
if (processed == 0)
{
processed = -1L;
}
else
{
processed = -processed;
}
return processed;
}

if (status.equals("idle"))
{
if (elapsed == null)
{
return Long.MIN_VALUE;
}
return processed;
}
return Long.MIN_VALUE;
}



Re: Query vs Filter Query Usage

2011-08-24 Thread Joshua Harness
Shawn -

 Thanks for your reply. Given that my application is mainly used as
faceted search, would the following types of queries make sense or are there
other pitfalls to consider?

*q=*:*&fq=someField:someValue&fq=anotherField:anotherValue*

Thanks!

Josh

On Wed, Aug 24, 2011 at 4:48 PM, Shawn Heisey  wrote:

> On 8/24/2011 2:02 PM, Joshua Harness wrote:
>
>>  I've done some basic query performance testing on my SOLR instance,
>> which allows users to search via a faceted search interface. As such,
>> document relevancy is less important to me since I am performing exact
>> match
>> searching. Comparing using filter queries with a plain query has yielded
>> remarkable performance.  However, I'm suspicious of statements like
>> 'always
>> use filter queries since they are so much faster'. In my experience,
>> things
>> are never so straightforward. Can anybody provide any further guidance?
>> What
>> are the pitfalls of relying heavily on filter queries? When would one want
>> to use plain vanilla SOLR queries as opposed to filter queries?
>>
>
> Completely separate from any performance consideration, the key to their
> usage lies in their name:  They are filters.  They are particularly useful
> in a faceted situation, because you can have more than one of them, and the
> overall result is the intersection (AND) of them all.
>
> When someone tells the interface to restrict their search by a facet, you
> can simply add a filter query with the field:value relating to that facet
> and reissue the query.  If they decide to remove that restriction, you just
> have to remove the filter query.  You don't have to try and combine the
> various pieces in the query, which means you'll have much less hassle with
> parentheses.
>
> If you need a union (OR) operation with your filters, you'll have to use
> more complex construction within a single filter query, or not use them at
> all.
>
> Thanks,
> Shawn
>
>


Best way to anchor solr searches?

2011-08-24 Thread arian487
If I'm searching for users based on last login time, and I search once, then
go to the second page with a new offset, I could potentially see the same
users on page 2 if the index has changed.  What is the best way to anchor it
so I avoid this?  

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Best-way-to-anchor-solr-searches-tp3282576p3282576.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: commitWithin + SolrJ

2011-08-24 Thread Chris Hostetter

: I ended up doing this with request.process(server) on an UpdateRequest
: class.

right ... if you peek under the covers of SolrServer most of it's 
methods are are just convinience methods for constructing a Request, 
setting some attributes/streams on it, and then processing it via that 
Server instance.


-Hoss


Re: Where the heck do you put maxAnalyzedChars?

2011-08-24 Thread Koji Sekiguchi

(11/08/25 5:29), Daniel Skiles wrote:

I have a very large field in my index that I need to highlight.  Where in
the config file do I set the maxAnalyzedChars in order to make this work?
Has anyone successfully done this?



Placing it in your requestHandler should work. For example:


  
1000
  


koji
--
Check out "Query Log Visualizer" for Apache Solr
http://www.rondhuit-demo.com/loganalyzer/loganalyzer.html
http://www.rondhuit.com/en/


Re: Getting DIH status with SolrJ

2011-08-24 Thread Shawn Heisey

On 8/24/2011 3:24 PM, Dyer, James wrote:

Shawn,

I do not know of an easy or a good way to do this.  It would be nice if there 
were a non-frail, programmatic way to get back DIH status but I don't think 
there is one.  I have a (monsterous) program that polls a running DIH handler 
every so often to get its status.  The crux is something like this:

DirectXmlRequest req = new DirectXmlRequest(requestUrl, null);
req.setMethod(METHOD.GET);
req.setParams(params);
NamedList  nl = server.request("/dataimport");

String status = (String) nl.get("status");
String response = (String) nl.get("importResponse");

Map  msgs = (Map) nl.get("statusMessages");
if(msgs!=null)
{
String numReq = (String) msgs.get("Total Requests made to DataSource");
String numRows = (String) msgs.get("Total Documents Processed");
String docsSkipped = (String) msgs.get("Total Documents Skipped");
String timeStarted = (String) msgs.get("Full Dump Started");
String elapsed = (String) msgs.get("Time taken ");
String aborted = (String) msgs.get("Aborted");
String plaintextMsg = (String) msgs.get("");
}

Not sure this is what you're after, but maybe it'd be helpful.  Like I say, I 
wish [I knew of|there was] a better way to do this...


It might not be the prettiest code, but I'll take it.  Thank you.  I 
paraphrased quite a bit and have ended up with the following:


String numRows = null;
String elapsed = null;
String aborted = null;
String plaintextMsg = null;

SolrRequest req = new DirectXmlRequest("/dataimport", null);
NamedList nl = solrCore.request(req);

String status = (String) nl.get("status");
@SuppressWarnings("unchecked")
Map msgs = (Map) nl
.get("statusMessages");
if (msgs != null)
{
numRows = (String) msgs.get("Total Documents Processed");
elapsed = (String) msgs.get("Time taken ");
aborted = (String) msgs.get("Aborted");
plaintextMsg = (String) msgs.get("");
}

I've tried it and it seems to work reliably.  If anyone out there knows 
a better method to pull this off, I'd certainly like to hear about it.


Thanks,
Shawn



Re: Newbie Question, can I store structured sub elements?

2011-08-24 Thread dan whelan
You could change starttime and channelname to multiValued=true and use 
these fields to store all the values for those fields.


showing.movie_id and showing.id probably isn't needed in a solr record.



On 8/24/11 7:53 AM, Zac Tolley wrote:

I have a very scenario in which I have a film and showings, each film has
multiple showings at set times on set channels, so I have:

Movie
-
id
title
description
duration


Showing
-
id
movie_id
starttime
channelname



I want to know can I store this in solr so that I keep this stucture?

I did try to do an initial import with the DIH using this config:







  
  
  



I was hoping, for each movie to get a sub entity with the showing like:


.

  



RE: query

2011-08-24 Thread Jaeger, Jay - DOT
One way I had thought of doing this kind of thing:  include in the index an 
"ACL" of some sort.  The problem I see in your case is that the list if 
"friends" can presumably change over time.

So, given that, one way would be to have a little application in between.  The 
request goes to the application, which does the query, and then filters out the 
results based upon friendship.  

I suppose it might be possible to write a specialized class which acts as a 
filter (and is so identified in the Solr schema) which queries the database.

In any event, I doubt you can get Solr to do this by itself without some code 
because of the likely dynamic nature of the "friendship" 

JRJ

-Original Message-
From: directorscott [mailto:dgul...@gmail.com] 
Sent: Wednesday, August 24, 2011 4:47 AM
To: solr-user@lucene.apache.org
Subject: query

Hello,

In my application, users prepare documents and they can share them with
friends. Friendships between users are persisted in database. When a user
issues a search, system should bring only those documents which are prepared
by friends of the user who makes the search. Can anyone please show me the
path to achieve such use case? I am considering about concatenating friend
id's and index them as 1 column but i am new to SOLR and i would love to
find out the other options.

Thanks

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


RE: how to deal with URLDatasource which needs authorization?

2011-08-24 Thread Jaeger, Jay - DOT
You could run the HTML import from Tika (see the Solr tutorial on the Solr 
website).  The job that ran Tika would need the user/password of the site to be 
indexed, but Solr would not.  (You might have to write a little script to get 
the HTML page using curl or wget or Nutch).

Users could then search the index so created, without having access to the 
actual web site, which I think is what you are asking.

But beware:  Depending on what / how you index, you may end up revealing 
information that you did not intend to reveal in the index.

-Original Message-
From: deniz [mailto:denizdurmu...@gmail.com] 
Sent: Wednesday, August 24, 2011 4:38 AM
To: solr-user@lucene.apache.org
Subject: how to deal with URLDatasource which needs authorization?

hi all

i am trying to index a page which basically returns an xml file. But i dont
want it to be accessible for anyone else... the page will basically check
for authorization like username and password...

e.g

the page which return is this :

www.blablabla.com/xyz

i would like to index the data from here, but i dont want anyone else to
access it. 

so what to do for adding authorization information to solr, order to let it
index the data

-
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-deal-with-URLDatasource-which-needs-authorization-tp3280515p3280515.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: automatically dealing with out of memory exceptions

2011-08-24 Thread Daniel Skiles
I've gotten around that by using the Java Service
Wrapperfrom Tanuki Soft to restart
the entire container.

On Wed, Aug 24, 2011 at 5:28 PM, Jason Toy  wrote:

> After running a combination of different queries, my solr server eventually
> is unable to complete certain requests because it runs out of memory, which
> means I need to restart the server as its basically useless with some
> queries working and not others.   I am moving to distributed setting soon,
> but in the meantime how can I deal with automatically restarting the server
> when it fails on certain queries?   I don't know what the queries it will
> die on are ahead of time, so I can't ping the server for certain queries to
> see if its dying.
>


automatically dealing with out of memory exceptions

2011-08-24 Thread Jason Toy
After running a combination of different queries, my solr server eventually
is unable to complete certain requests because it runs out of memory, which
means I need to restart the server as its basically useless with some
queries working and not others.   I am moving to distributed setting soon,
but in the meantime how can I deal with automatically restarting the server
when it fails on certain queries?   I don't know what the queries it will
die on are ahead of time, so I can't ping the server for certain queries to
see if its dying.


RE: Getting DIH status with SolrJ

2011-08-24 Thread Dyer, James
Shawn,

I do not know of an easy or a good way to do this.  It would be nice if there 
were a non-frail, programmatic way to get back DIH status but I don't think 
there is one.  I have a (monsterous) program that polls a running DIH handler 
every so often to get its status.  The crux is something like this:

DirectXmlRequest req = new DirectXmlRequest(requestUrl, null);
req.setMethod(METHOD.GET);
req.setParams(params);
NamedList nl = server.request("/dataimport");

String status = (String) nl.get("status");
String response = (String) nl.get("importResponse");

Map msgs = (Map) nl.get("statusMessages");
if(msgs!=null)
{
String numReq = (String) msgs.get("Total Requests made to DataSource");
String numRows = (String) msgs.get("Total Documents Processed");
String docsSkipped = (String) msgs.get("Total Documents Skipped");
String timeStarted = (String) msgs.get("Full Dump Started");
String elapsed = (String) msgs.get("Time taken ");
String aborted = (String) msgs.get("Aborted");
String plaintextMsg = (String) msgs.get("");
}

Not sure this is what you're after, but maybe it'd be helpful.  Like I say, I 
wish [I knew of|there was] a better way to do this...

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


-Original Message-
From: Shawn Heisey [mailto:s...@elyograg.org] 
Sent: Wednesday, August 24, 2011 3:52 PM
To: solr-user@lucene.apache.org
Subject: Getting DIH status with SolrJ

I can't figure out how to get the particular information I need out of a 
Solr response with SolrJ.  I see that QueryResponse has a number of 
methods for getting specific information out, but as far as I can see, 
none of them have anything at all to do with the DIH.  I've started out 
with the following code.  The solrCore object is a CommonsHttpSolrServer 
that is defined at the class level and initialized by the constructor:

 ModifiableSolrParams p = new ModifiableSolrParams();
 p.set("qt", "/dataimport");
 QueryResponse qr = solrCore.query(p);

What do I do with qr?  I've been looking at the docs and cannot figure 
it out.  Can someone fill my poor clueless brain in on what I'm 
missing?  Is there a better approach than what I've got above?

 From the /dataimport response, I need to see the value of "status" and 
then I need to access several pieces of information under the 
"statusMessages" section.  I haven't been able to find an example.

Thanks,
Shawn



Getting DIH status with SolrJ

2011-08-24 Thread Shawn Heisey
I can't figure out how to get the particular information I need out of a 
Solr response with SolrJ.  I see that QueryResponse has a number of 
methods for getting specific information out, but as far as I can see, 
none of them have anything at all to do with the DIH.  I've started out 
with the following code.  The solrCore object is a CommonsHttpSolrServer 
that is defined at the class level and initialized by the constructor:


ModifiableSolrParams p = new ModifiableSolrParams();
p.set("qt", "/dataimport");
QueryResponse qr = solrCore.query(p);

What do I do with qr?  I've been looking at the docs and cannot figure 
it out.  Can someone fill my poor clueless brain in on what I'm 
missing?  Is there a better approach than what I've got above?


From the /dataimport response, I need to see the value of "status" and 
then I need to access several pieces of information under the 
"statusMessages" section.  I haven't been able to find an example.


Thanks,
Shawn



Re: Query vs Filter Query Usage

2011-08-24 Thread Shawn Heisey

On 8/24/2011 2:02 PM, Joshua Harness wrote:

  I've done some basic query performance testing on my SOLR instance,
which allows users to search via a faceted search interface. As such,
document relevancy is less important to me since I am performing exact match
searching. Comparing using filter queries with a plain query has yielded
remarkable performance.  However, I'm suspicious of statements like 'always
use filter queries since they are so much faster'. In my experience, things
are never so straightforward. Can anybody provide any further guidance? What
are the pitfalls of relying heavily on filter queries? When would one want
to use plain vanilla SOLR queries as opposed to filter queries?


Completely separate from any performance consideration, the key to their 
usage lies in their name:  They are filters.  They are particularly 
useful in a faceted situation, because you can have more than one of 
them, and the overall result is the intersection (AND) of them all.


When someone tells the interface to restrict their search by a facet, 
you can simply add a filter query with the field:value relating to that 
facet and reissue the query.  If they decide to remove that restriction, 
you just have to remove the filter query.  You don't have to try and 
combine the various pieces in the query, which means you'll have much 
less hassle with parentheses.


If you need a union (OR) operation with your filters, you'll have to use 
more complex construction within a single filter query, or not use them 
at all.


Thanks,
Shawn



Where the heck do you put maxAnalyzedChars?

2011-08-24 Thread Daniel Skiles
I have a very large field in my index that I need to highlight.  Where in
the config file do I set the maxAnalyzedChars in order to make this work?
Has anyone successfully done this?


Re: commitWithin + SolrJ

2011-08-24 Thread Daniel Skiles
I ended up doing this with request.process(server) on an UpdateRequest
class.

On Wed, Aug 24, 2011 at 2:07 PM, Daniel Skiles
wrote:

> What is the cleanest way to use the commitWithin directive with SolrJ?
> AbstractUpdateRequest has a setCommitWithin() method, but I don't see how to
> hook that into SolrServer.add(SolrInputDocument doc).
>
> Do I need to use SolrServer.request(), or do I need to use some other
> method?
>
> Thanks.
>


Query vs Filter Query Usage

2011-08-24 Thread Joshua Harness
All -

 I apologize if this question has been asked before - I couldn't seem to
find a straightforward answer by researching it on google and stackoverflow.
I am trying to understand when I should use filter queries vs plain vanilla
queries.  Here's what I understand:

* Filter queries can be much faster since as of SOLR 1.4 they are
parallelized with the main query and are cached in the filter cache. This is
in contrast with SOLR < 1.4 where the filter query was ran on the doc set
after the main query returned - essentially causing an O(n) operation.
* Filter queries do not affect document score. Use them if one doesn't want
the filter query to impact the score.

 I've done some basic query performance testing on my SOLR instance,
which allows users to search via a faceted search interface. As such,
document relevancy is less important to me since I am performing exact match
searching. Comparing using filter queries with a plain query has yielded
remarkable performance.  However, I'm suspicious of statements like 'always
use filter queries since they are so much faster'. In my experience, things
are never so straightforward. Can anybody provide any further guidance? What
are the pitfalls of relying heavily on filter queries? When would one want
to use plain vanilla SOLR queries as opposed to filter queries?

Thanks!

Josh


Solr support for stored procedures

2011-08-24 Thread Maria Vazquez
Does Solr support calling stored procedures in the data-config.xml?




Thanks!
Maria



commitWithin + SolrJ

2011-08-24 Thread Daniel Skiles
What is the cleanest way to use the commitWithin directive with SolrJ?
AbstractUpdateRequest has a setCommitWithin() method, but I don't see how to
hook that into SolrServer.add(SolrInputDocument doc).

Do I need to use SolrServer.request(), or do I need to use some other
method?

Thanks.


Re: Text Analysis and copyField

2011-08-24 Thread Erick Erickson
Have you considered having two dictionaries and using ajax to query
them both and
intermingling the results in your suggestions? It'd be some work, but
I think it might
accomplish what you want.

Best
Erick

On Tue, Aug 23, 2011 at 1:48 PM, Herman Kiefus  wrote:
> To close, I found this article from Hoss: 
> http://lucene.472066.n3.nabble.com/CopyField-into-another-CopyField-td3122408.html
>
> Since I cannot use one copyField directive to copy from another copyField's 
> dest[ination], I cannot achieve what I desire: some terms that are subject to 
> KeepWordFilterFactory and some that are not.
>
> -Original Message-
> From: Erick Erickson [mailto:erickerick...@gmail.com]
> Sent: Monday, August 22, 2011 1:16 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Text Analysis and copyField
>
> I suspect that the things going into TermsDictionary are from fields other 
> than CorrectlySpelledTerms.
>
> In other words I don't think that anything is getting into TermsDictionary 
> from CorrectlySpelledTerms...
>
> Be careful to remove the index between schema changes, just to be sure that 
> you're not seeing old data.
>
> Best
> Erick
>
> On Mon, Aug 22, 2011 at 11:41 AM, Herman Kiefus  
> wrote:
>> That's what I thought, but my experiments show differently.  In actuality:
>>
>> I have a number of fields that are of type "text" (the default as it is 
>> packaged).
>>
>> I have a type 'textCorrectlySpelled' that utilizes KeepWordFilterFactory in 
>> index-time analysis, using a file of terms which are known to be correctly 
>> spelled.
>>
>> I have a type 'textDictionary' that has no index-time analysis.
>>
>> I have the fields:
>> > indexed="false" stored="false" multiValued="true"/> > name="TermsDictionary" type="textDictionary" indexed="true"
>> stored="false" multiValued="true"/>
>>
>> I want 'TermsDictionary' to contain only those terms from some fields that 
>> are correctly spelled plus those terms from a couple other fields 
>> (CompanyName and ContactName) as is.  I use several copyField directives as 
>> follows:
>>
>>  > source="Field2" dest="CorrectlySpelledTerms"/> > source="Field3" dest="CorrectlySpelledTerms"/>
>>
>>  > source="Contact" dest="TermsDictionary"/> > ="CorrectlySpelledTerms" dest="TermsDictionary"/>
>>
>> If I query 'Field1' for a term that I know is misspelled (electical) it 
>> yields results.
>> If I query 'TermsDictionary' for the same term it yields no results.
>>
>> It would seem by these results that 'TermsDictionary' only contains those 
>> terms with misspellings stripped as a results of the text analysis on the 
>> field 'CorrectlySpelledTerms'.
>>
>> Asked another way, I think you can see what I'm getting at: a source for the 
>> spellchecker that only contains correct spelled terms plus proper names; 
>> should I have gone about this in a different way?
>>
>> -Original Message-
>> From: Stephen Duncan Jr [mailto:stephen.dun...@gmail.com]
>> Sent: Monday, August 22, 2011 9:30 AM
>> To: solr-user@lucene.apache.org
>> Subject: Re: Text Analysis and copyField
>>
>> On Mon, Aug 22, 2011 at 9:25 AM, Herman Kiefus  
>> wrote:
>>> Is my thinking correct?
>>>
>>> I have a field 'F1' of type 'T1' whose index time analysis employs the 
>>> StopFilterFactory.
>>>
>>> I also have a field 'F2' of type 'T2' whose index time analysis does NOT 
>>> employ the StopFilterFactory.
>>>
>>> There is a copyField directive source="F1" dest="F2"
>>>
>>> F2 will not contain any stop words because they were filtered out as F1 was 
>>> populated.
>>>
>>
>> No, F2 will contain stop words.  Copy fields does not process input through 
>> a chain, it sends the original content to each field and therefore analysis 
>> is totally independent.
>>
>> --
>> Stephen Duncan Jr
>> www.stephenduncanjr.com
>>
>


Re: csv responsewriter and numfound

2011-08-24 Thread Jon Hoffman
I took a look at the source and agree that it would be a bit hairy to bubble
up header settings from the response writers.

Alternatively, and I'll admit that this is a somewhat hacky proposal, an
optional parameter "csv.numfound=true" could be added to the request which
would cause the first line of the response to be the numfound.  It would
have no impact on existing behavior, and those who are interested in that
value can simply read off the first line before sending to their usual csv
parser.

It's a trivial change to the code and I can create a JIRA ticket and submit
the patch.

This is my first interaction with this forum, so let me know if the dev list
is a more appropriate place to propose changes.

- Jon


On Wed, Aug 24, 2011 at 10:47 AM, Erik Hatcher wrote:

> Good idea.  However response writers can't control HTTP response headers
> currently... Only the content type returned.
>
>Erik
>
> On Aug 24, 2011, at 8:52, Jon Hoffman  wrote:
>
> > What about the HTTP response header?
> >
> >
> >>> Great question.  But how would that get returned in the response?
> >>>
> >>> It is a drag that the header is lost when results are written in CSV,
> but
> >> there really isn't an obvious spot for that information to be returned.
> >>
> >> I guess a comment would be one option.
> >>
> >> -Yonik
> >> http://www.lucidimagination.com
> >>
> >>
> >>
>


Replication: solrconfig.xml

2011-08-24 Thread alexander
Dear Solr users,

I am getting a bit confused here:
On Solr 1.4, multicore setup, all config files listed get replicated properly, 
the only exception being "solrconfig.xml".

I have tried these two variations on the master's side:

1.)
schema.xml,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml,solrconfig_slave.xml:solrconfig.xml

2.)
schema.xml,protwords.txt,stopwords.txt,synonyms.txt,elevate.xml
solrconfig_slave.xml:solrconfig.xml

Neither succeeded.
Am I missing something?

Kind regards,
 Alex


Re: Field type change / copy field

2011-08-24 Thread Alexei Martchenko
have u tried in your facet_year index analyzer something like this?




this can theoretically do the trick


2011/8/24 Oliver Schihin 

> Hello list
>
> My documents come with a field holding a date, always a year:
> 2008
> In the schema, this content is taken for a field  as an integer, and
> it will be searchable.
>
> Through a copyfield-instruction I move the  to a -field,
> you guess, to use it for faceting and make range queries possible. Its field
> type is of the class 'solr.TrieDateField' that requires canonical date
> representation. Is there a way in solr to extend the simple year to
> 2008-01-01T00:00:**00Z. Or, do i have to solve
> the problem in preprocessing, before posting?
>
> Thanks
> Oliver
>



-- 

*Alexei Martchenko* | *CEO* | Superdownloads
ale...@superdownloads.com.br | ale...@martchenko.com.br | (11)
5083.1018/5080.3535/5080.3533


Re: hierarchical faceting in Solr?

2011-08-24 Thread Alexei Martchenko
Cheers, very good, congratulations

2011/8/23 Naomi Dushay 

> Chris Beer just did a revamp of the wiki page at:
>
>  
> http://wiki.apache.org/solr/**HierarchicalFaceting
>
> Yay Chris!
>
> - Naomi
> (" ... and I helped!")
>
>
> On Aug 22, 2011, at 10:49 AM, Naomi Dushay wrote:
>
>  Chris,
>>
>> Is there a document somewhere on how to do this?  If not, might you create
>> one?   I could even imagine such a document living on the Solr wiki ...
>>  this one has mostly ancient content:
>>
>> http://wiki.apache.org/solr/**HierarchicalFaceting
>>
>> - Naomi
>>
>
>


-- 

*Alexei Martchenko* | *CEO* | Superdownloads
ale...@superdownloads.com.br | ale...@martchenko.com.br | (11)
5083.1018/5080.3535/5080.3533


Re: Full sentence spellcheck

2011-08-24 Thread Valentin
I've run some tests, and I found that it makes this error when i add a
spellcheck component to a handler and i try to use spellcheck.q

So spellcheck.q works with this kind of use :

http://localhost:8983/solr/db/suggest_full?q=american%20israel&spellcheck.q=american%20israel&qt=spellchecker
(with the original spellchecker of db)

But this spellchecker has the class solr.SpellCheckerRequestHandler that
doesn't have all the options I want (like collation).

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Full-sentence-spellcheck-tp3265257p3281189.html
Sent from the Solr - User mailing list archive at Nabble.com.


Newbie Question, can I store structured sub elements?

2011-08-24 Thread Zac Tolley
I have a very scenario in which I have a film and showings, each film has
multiple showings at set times on set channels, so I have:

Movie
-
id
title
description
duration


Showing
-
id
movie_id
starttime
channelname



I want to know can I store this in solr so that I keep this stucture?

I did try to do an initial import with the DIH using this config:


   
   
   

   
 
 
 
   


I was hoping, for each movie to get a sub entity with the showing like:


   .
   
 

Re: csv responsewriter and numfound

2011-08-24 Thread Erik Hatcher
Good idea.  However response writers can't control HTTP response headers 
currently... Only the content type returned.  

Erik

On Aug 24, 2011, at 8:52, Jon Hoffman  wrote:

> What about the HTTP response header?
> 
> 
>>> Great question.  But how would that get returned in the response?
>>> 
>>> It is a drag that the header is lost when results are written in CSV, but
>> there really isn't an obvious spot for that information to be returned.
>> 
>> I guess a comment would be one option.
>> 
>> -Yonik
>> http://www.lucidimagination.com
>> 
>> 
>> 


Re: Property "undefined" in Schema Browser (Solr Admin)

2011-08-24 Thread Chantal Ackermann
Hi Stefan,

I'm using Firefox 3.6.20 and Chromium 12.0.742.112 (90304) Ubuntu 10.10.

The "undefined" appears with both of them.


Chantal



On Wed, 2011-08-24 at 14:09 +0200, Stefan Matheis wrote:
> Hi Chantal,
> 
> On Wed, Aug 24, 2011 at 1:43 PM, Chantal Ackermann
>  wrote:
> > There is a capital F which is not listed as key? But this is also the
> > case in your example so probably I'm confusing something.
> 
> There's a quick hack in place, which tries: the character, the
> lowercase character & the uppercase character - so there should be a
> least one correlation.
> 
> But i'll add an additional check to the code, that 'undefined'-values
> will be skip for the list.
> 
> Just to check that, which Browser are you using? The UI was developed
> using Firefox4 & Chrome12+ and is not fully tested on others browsers
> :/
> 
> Regards
> Stefan



Re: Spatial Search problems

2011-08-24 Thread Smiley, David W.
Well that's your problem :-P  You need to be using the same version of Lucene 
for reading & writing.  Create your index with Lucene 3.3.

FYI I tried indexing the point you said you had trouble with, and with a 300km 
radius, and it found it.

On Aug 24, 2011, at 4:39 AM, Javier Heras wrote:

> And one more thing... should I create the index with the same version of solr
> that I use to open index for reading??? I create my index with lucene 2.9,
> and my solr version where Im trying spatial search is 3.3
> 
> Thank you very much David
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Spatial-Search-problems-tp3277945p3280389.html
> Sent from the Solr - User mailing list archive at Nabble.com.



can you help on this?

2011-08-24 Thread abhijit bashetti
SEVERE: java.lang.InternalError: a fault occurred in a recent unsafe memory
access operation in compiled Java code
at org.apache.lucene.store.DataInput.readVInt(DataInput.java:108)
at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:64)
at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:166)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:273)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:209)
at org.apache.lucene.index.SegmentReader.docFreq(SegmentReader.java:503)
at org.apache.solr.search.SolrIndexReader.docFreq(SolrIndexReader.java:309)
at org.apache.lucene.search.TermQuery$TermWeight$1.add(TermQuery.java:56)
at org.apache.lucene.util.ReaderUtil$Gather.run(ReaderUtil.java:77)
at org.apache.lucene.util.ReaderUtil$Gather.run(ReaderUtil.java:82)
at org.apache.lucene.util.ReaderUtil$Gather.run(ReaderUtil.java:66)
at org.apache.lucene.search.TermQuery$TermWeight.(TermQuery.java:53)
at org.apache.lucene.search.TermQuery.createWeight(TermQuery.java:198)
at
org.apache.lucene.search.BooleanQuery$BooleanWeight.(BooleanQuery.java:176)
at org.apache.lucene.search.BooleanQuery.createWeight(BooleanQuery.java:354)
at
org.apache.lucene.search.Searcher.createNormalizedWeight(Searcher.java:168)
at
org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:661)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:320)
at
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1178)
at
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1066)
at
org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:358)
at
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:258)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1368)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)


Re: csv responsewriter and numfound

2011-08-24 Thread Jon Hoffman
What about the HTTP response header?


> > Great question.  But how would that get returned in the response?
> >
> > It is a drag that the header is lost when results are written in CSV, but
> there really isn't an obvious spot for that information to be returned.
>
> I guess a comment would be one option.
>
> -Yonik
> http://www.lucidimagination.com
>
>
>


Re: Property "undefined" in Schema Browser (Solr Admin)

2011-08-24 Thread Stefan Matheis
Hi Chantal,

On Wed, Aug 24, 2011 at 1:43 PM, Chantal Ackermann
 wrote:
> There is a capital F which is not listed as key? But this is also the
> case in your example so probably I'm confusing something.

There's a quick hack in place, which tries: the character, the
lowercase character & the uppercase character - so there should be a
least one correlation.

But i'll add an additional check to the code, that 'undefined'-values
will be skip for the list.

Just to check that, which Browser are you using? The UI was developed
using Firefox4 & Chrome12+ and is not fully tested on others browsers
:/

Regards
Stefan


Re: Property "undefined" in Schema Browser (Solr Admin)

2011-08-24 Thread Chantal Ackermann
Hi Stefan,

thanks for your time!

There is a capital F which is not listed as key? But this is also the
case in your example so probably I'm confusing something.

Anyway, the respective output of: /admin/luke?fl=title
is:


string
I-SM---OF---l
I-SO
16697
8476
−

...

−

...



−

−

Indexed
Tokenized
Stored
Multivalued
TermVector Stored
Store Offset With TermVector
Store Position With TermVector
Omit Norms
Lazy
Binary
Sort Missing First
Sort Missing Last



Cheers,
Chantal


On Wed, 2011-08-24 at 11:44 +0200, Stefan Matheis wrote:
> Hi Chantal,
> 
> how does your luke-output look like?
> 
> What the Schema-Browser does is, it takes the schema- & index-element:
> > I-SOF---l
> > I-SO
> 
> and does a lookup for every mentioned character in the key-hash:
> > 
> > Indexed
> > Tokenized
> > Stored
> > Multivalued
> > TermVector Stored
> > Store Offset With TermVector
> > Store Position With TermVector
> > Omit Norms
> > Lazy
> > Binary
> > Sort Missing First
> > Sort Missing Last
> > 
> 
> so i guess there is something in your output, that could not be mapped
> :/ i just checked this with the example schema .. so there may be
> cases which are not correct.
> 
> Regards
> Stefan
> 
> On Wed, Aug 24, 2011 at 10:48 AM, Chantal Ackermann
>  wrote:
> > Hi all,
> >
> > the Schema Browser in the SOLR Admin shows me the following information:
> >
> >
> > """
> > Field: title
> >
> > Field Type: string
> >
> > Properties: Indexed, Stored, Multivalued, Omit Norms, undefined, Sort
> > Missing Last
> >
> > Schema: Indexed, Stored, Multivalued, Omit Norms, undefined, Sort
> > Missing Last
> >
> > Index: Indexed, Stored, Omit Norms
> > """
> >
> > I was wandering where this "undefined" property comes from. I had a look
> > at:
> > http://wiki.apache.org/solr/LukeRequestHandler
> > and the schema.jsp
> > but to no avail so far.
> >
> > Could someone give me a hint? I'm just wondering whether I am missing
> > some problem with my field declaration which is:
> >
> >  > required="true" multiValued="true"/>
> >
> > Thanks a lot!
> > Chantal
> >
> >



Field type change / copy field

2011-08-24 Thread Oliver Schihin

Hello list

My documents come with a field holding a date, always a year:
2008In the schema, this content is taken for a field  as an integer, and it will be 
searchable.


Through a copyfield-instruction I move the  to a -field, you guess, to 
use it for faceting and make range queries possible. Its field type is of the class 
'solr.TrieDateField' that requires canonical date representation. Is there a way in solr 
to extend the simple year to 2008-01-01T00:00:00Z. Or, do i have 
to solve the problem in preprocessing, before posting?


Thanks
Oliver


query

2011-08-24 Thread directorscott
Hello,

In my application, users prepare documents and they can share them with
friends. Friendships between users are persisted in database. When a user
issues a search, system should bring only those documents which are prepared
by friends of the user who makes the search. Can anyone please show me the
path to achieve such use case? I am considering about concatenating friend
id's and index them as 1 column but i am new to SOLR and i would love to
find out the other options.

Thanks

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


Re: Property "undefined" in Schema Browser (Solr Admin)

2011-08-24 Thread Stefan Matheis
Hi Chantal,

how does your luke-output look like?

What the Schema-Browser does is, it takes the schema- & index-element:
> I-SOF---l
> I-SO

and does a lookup for every mentioned character in the key-hash:
> 
> Indexed
> Tokenized
> Stored
> Multivalued
> TermVector Stored
> Store Offset With TermVector
> Store Position With TermVector
> Omit Norms
> Lazy
> Binary
> Sort Missing First
> Sort Missing Last
> 

so i guess there is something in your output, that could not be mapped
:/ i just checked this with the example schema .. so there may be
cases which are not correct.

Regards
Stefan

On Wed, Aug 24, 2011 at 10:48 AM, Chantal Ackermann
 wrote:
> Hi all,
>
> the Schema Browser in the SOLR Admin shows me the following information:
>
>
> """
> Field: title
>
> Field Type: string
>
> Properties: Indexed, Stored, Multivalued, Omit Norms, undefined, Sort
> Missing Last
>
> Schema: Indexed, Stored, Multivalued, Omit Norms, undefined, Sort
> Missing Last
>
> Index: Indexed, Stored, Omit Norms
> """
>
> I was wandering where this "undefined" property comes from. I had a look
> at:
> http://wiki.apache.org/solr/LukeRequestHandler
> and the schema.jsp
> but to no avail so far.
>
> Could someone give me a hint? I'm just wondering whether I am missing
> some problem with my field declaration which is:
>
>  required="true" multiValued="true"/>
>
> Thanks a lot!
> Chantal
>
>


how to deal with URLDatasource which needs authorization?

2011-08-24 Thread deniz
hi all

i am trying to index a page which basically returns an xml file. But i dont
want it to be accessible for anyone else... the page will basically check
for authorization like username and password...

e.g

the page which return is this :

www.blablabla.com/xyz

i would like to index the data from here, but i dont want anyone else to
access it. 

so what to do for adding authorization information to solr, order to let it
index the data

-
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-deal-with-URLDatasource-which-needs-authorization-tp3280515p3280515.html
Sent from the Solr - User mailing list archive at Nabble.com.


Property "undefined" in Schema Browser (Solr Admin)

2011-08-24 Thread Chantal Ackermann
Hi all,

the Schema Browser in the SOLR Admin shows me the following information:


"""
Field: title

Field Type: string

Properties: Indexed, Stored, Multivalued, Omit Norms, undefined, Sort
Missing Last

Schema: Indexed, Stored, Multivalued, Omit Norms, undefined, Sort
Missing Last

Index: Indexed, Stored, Omit Norms
"""

I was wandering where this "undefined" property comes from. I had a look
at:
http://wiki.apache.org/solr/LukeRequestHandler
and the schema.jsp
but to no avail so far.

Could someone give me a hint? I'm just wondering whether I am missing
some problem with my field declaration which is:



Thanks a lot!
Chantal



Re: Spatial Search problems

2011-08-24 Thread Javier Heras
And one more thing... should I create the index with the same version of solr
that I use to open index for reading??? I create my index with lucene 2.9,
and my solr version where Im trying spatial search is 3.3

Thank you very much David

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Spatial-Search-problems-tp3277945p3280389.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Copying cores with solrj?

2011-08-24 Thread Manish Bafna
Use replication

On Wed, Aug 24, 2011 at 1:26 PM, Michael Szalay
wrote:

> Hi all
>
> We have a setup with two cores, a "current" and a "work". The current is
> used
> by the application and the work is used by the updating program.
>
> I'm implementing a partial index updater. To do that, I want to copy the
> "current" core
> to the "work" so that I can have the current state to start with.
>
> I'm missing the "COPY"-Core admin request. How can I copy the index of the
> first core
> to the second one in a efficient manner?
>
> Regards Michael
>
> --
> Michael Szalay
> Senior Software Engineer
>
> basis06 AG, Birkenweg 61, CH-3013 Bern - Fon +41 31 311 32 22
> http://www.basis06.ch - source of smart business
>
>


Re: Problem using stop words

2011-08-24 Thread Lance Norskog
A note: in the first schema, you had the stopwords after the stemmer.
This would not work, since the stopwords are not stemmed.

On Wed, Aug 24, 2011 at 12:59 AM, _snake_  wrote:
> I forgot to say that my stopwords file is in the same location as the schema
> file and the solrconfig file.
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Problem-using-stop-words-tp3274598p3280319.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



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


Re: Problem using stop words

2011-08-24 Thread _snake_
I forgot to say that my stopwords file is in the same location as the schema
file and the solrconfig file.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Problem-using-stop-words-tp3274598p3280319.html
Sent from the Solr - User mailing list archive at Nabble.com.


Copying cores with solrj?

2011-08-24 Thread Michael Szalay
Hi all

We have a setup with two cores, a "current" and a "work". The current is used
by the application and the work is used by the updating program.

I'm implementing a partial index updater. To do that, I want to copy the 
"current" core
to the "work" so that I can have the current state to start with.

I'm missing the "COPY"-Core admin request. How can I copy the index of the 
first core
to the second one in a efficient manner?

Regards Michael

-- 
Michael Szalay
Senior Software Engineer

basis06 AG, Birkenweg 61, CH-3013 Bern - Fon +41 31 311 32 22
http://www.basis06.ch - source of smart business 



Re: Problem using stop words

2011-08-24 Thread _snake_
Thanks everybody for your help!!

I change the stopwords file, and I only use one word per line, without start
/ ending spaces, and without comments.
I change it to UTF-8.
I am using the TermsComponent to suggest words to the user (JQuery UI
Autocomplete). So, the stopwords are still showed here...
Do I have to change the name of the fieldtype "string"?
I think the problem is that TermsComponent doesn't use the stopwords file.
Is there another way to suggest words to the user?
Thanks!


The Solr Analysis shows the following when I search the word 'a' (that is an
stopword) in a field that have all the content.
Query Analyzer
a

The content of schema file is:

   





   
   





   

The solrconfig.xml file:

  
 
  true
 

  terms

  



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Problem-using-stop-words-tp3274598p3280291.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: not equals query in solr

2011-08-24 Thread Ranveer Kumar
Hi,

is it right way to do :
q=(state:[* TO *] AND city:[* TO *])

regards
Ranveer

On Wed, Aug 24, 2011 at 12:54 PM, Ranveer Kumar wrote:

> Hi All,
>
> How to do negative query in solr. Following are the criteria :
> I have state and city field where I want to filter only those state and
> city which is not blank. something like: state NOT "" AND city NOT "".
> I tried -state:"" but its not working.
>
> Or suggest  me to do this in better way..
>
> regards
> Ranveer
>
>
>
>


Re: Sorting results by Range

2011-08-24 Thread Sowmya V.B.
Hi Chris

Thanks for the clarification.

My Doubt:* You said:
so if the range of legal values is 0-100, and you care about 10-20

sort=map(map(myNumField,0,10,0),20,100,0) desc, score desc
sort=map(map(myNumField,0,10,100),20,100,100) asc, score desc
*
By doing the first one, I got results with "myNumField" values between 10
and 20 ranked above all, in the descending order - 20, 18, 17, 13 etc.

By doing the second one, I expected to get the same results, ordered like
13, 17,18, 20. But, what I got were other values as results, that are not in
the chosen range: 9, 8,7, 5 etc.

My question previously was: How to get results with "myNumFields" values
between 10 and 20 ranked above the rest, in the ascending order.

Regards
Sowmya.
On Tue, Aug 23, 2011 at 7:48 PM, Chris Hostetter
wrote:

>
> : I did not quite understand how that function was made. But, it does work
>
> basically the "map" function just translates values in a ranage to some
> fixed vald value.  so if you nest two map functions (that use
> different ranges) inside of eachother you get a resulting curve that is
> flat in those two ranges (below 10 and above 20) and returns the actual
> field value in the middle.
>
> : (I chose a field with 0 and 100 as limits and tried with that. So,
> replaced
> : infinities with 0 and 100 respectively)
> :
> : sort=map(map(myNumField,-Infinity,10,0),20,Infinity,0) desc, score desc
> :
> : If I needed Sorted results in ascending order, Results around the value
> 10
> : ranked above those of 20, what should I do in this case?
> :
> : I tried giving,
> : sort=map(map(myNumField,-Infinity,10,0),20,Infinity,0) *asc*, score desc
> : But, that does not seem to work quite as I expected.
>
> Hmmm... ok.  FWIW: anytime you say things like "does not seem to work
> quite as I expected" ... you really need to explain: a) what you expected.
> b) what you got.
>
> But i think i see the problem...
>
> if you change to asc, then it's going to sort docs by the result of that
> function asc, and because of the map a *lot* of docs are going to have a
> value of "0" for that function -- so in addition to changing to "asc"
> you'll want to change the target value of that function to something above
> the upper endpoint of the range you care about (20 in this example)
>
> so if the range of legal values is 0-100, and you care about 10-20
>
> sort=map(map(myNumField,0,10,0),20,100,0) desc, score desc
> sort=map(map(myNumField,0,10,100),20,100,100) asc, score desc
>
>
>
> -Hoss
>



-- 
Sowmya V.B.

Losing optimism is blasphemy!
http://vbsowmya.wordpress.com



not equals query in solr

2011-08-24 Thread Ranveer Kumar
Hi All,

How to do negative query in solr. Following are the criteria :
I have state and city field where I want to filter only those state and city
which is not blank. something like: state NOT "" AND city NOT "".
I tried -state:"" but its not working.

Or suggest  me to do this in better way..

regards
Ranveer


Re: Spatial Search problems

2011-08-24 Thread Javier Heras
Hi David,

the thing is that all indexed points are in spain, so distances should
always be lower than 1300 Kms. And yes, I'm using solr tutorial scheme.xml,
for which tutorial indexes work fine. When I change to my index, it only
works when distances are over 4510Kms. The query I run is:

http://localhost:8983/solr/select?fl=*,score&q=*:*&fq={!geofilt}&sfield=store&pt=40.41669,-3.700346&d=4510

And some of my indexed points are:

38.99765,-1.86007

This point is supossed to be in between 250kms more or less.

One thing: which is the way the coordinates field should be indexed?

Thanks

Javier

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Spatial-Search-problems-tp3277945p3280207.html
Sent from the Solr - User mailing list archive at Nabble.com.