Re: Copy fields and appending of values

2015-08-14 Thread griglo
Thank you Shawn, indeed 4.7 :)
I tried this approach with default value and it doesn't seem to work. I have
my destination field defined as multiValued and I copy from one source with
default value and some other source field. Default value does not seem to
copy from source field to destination. I also tried setting default value to
destination field directly but that one gets overwritten by another
copyField. 

Here is relevant part of schema:







Is there anything suspicious ?? I also tried setting begin_prox_token field
as indexed but did not help. I would also expect that default values should
be copied. Thank you



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Copy-fields-and-appending-of-values-tp4222706p4222918.html
Sent from the Solr - User mailing list archive at Nabble.com.


solrcloud: compression in replication handler

2015-08-14 Thread Gopal Jee
I am using solrcloud version 4.10.1. As of now, our replication handler is
configured as:

  

I want to add compression to index replication. On web, i found ways to add
compression for master/slave. How do i add compression to replication
handler in solrcloud deployment.

--


Re: Copy fields and appending of values

2015-08-14 Thread Alexandre Rafalovitch
I would not be surprised if default value is assigned AFTER all the
copy field is done. That would make a lot more sense.

So, you may want to try setting that default value earlier in the
indexing process. Specifically, by creating a custom
UpdateRequestProcessor chain and using DefaultValue URP:
http://www.solr-start.com/javadoc/solr-lucene/org/apache/solr/update/processor/DefaultValueUpdateProcessorFactory.html

Regards,
   Alex.

Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
http://www.solr-start.com/


On 14 August 2015 at 03:44, griglo  wrote:
> Thank you Shawn, indeed 4.7 :)
> I tried this approach with default value and it doesn't seem to work. I have
> my destination field defined as multiValued and I copy from one source with
> default value and some other source field. Default value does not seem to
> copy from source field to destination. I also tried setting default value to
> destination field directly but that one gets overwritten by another
> copyField.
>
> Here is relevant part of schema:
>
>  indexed="false" stored="false" multiValued="false"/>
>  multiValued="true"/>
>
> 
> 
>
> Is there anything suspicious ?? I also tried setting begin_prox_token field
> as indexed but did not help. I would also expect that default values should
> be copied. Thank you
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Copy-fields-and-appending-of-values-tp4222706p4222918.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: solrcloud: compression in replication handler

2015-08-14 Thread Erick Erickson
Why do you think this is desirable? Unless something is
wrong somewhere, i.e. nodes go into recovery regularly,
there is no replication in SolrCloud. The original docs
are forwarded to each replica in a shard, _not_ the
final indexed format.

If you're seeing a lot of recoveries, then _that's_ the
problem you should be addressing. In the normal state,
adding compression to replication is probably not a
good use of time.

And the very _first_ thing I'd do is see what kind of
compression you get on a Lucene index. There's already
been quite a bit of work to make the data structures
compact. The stored data (*.fdt) files are _already_
compressed.

Best,
Erick

On Fri, Aug 14, 2015 at 1:01 AM, Gopal Jee  wrote:
> I am using solrcloud version 4.10.1. As of now, our replication handler is
> configured as:
>  startup="lazy">
>   
>
> I want to add compression to index replication. On web, i found ways to add
> compression for master/slave. How do i add compression to replication
> handler in solrcloud deployment.
>
> --


Re: Solr suggester throws error on core reload.

2015-08-14 Thread Erick Erickson
You might review: http://wiki.apache.org/solr/UsingMailingLists

You've provide exactly no information that would help us help you.

Or did you hijack the thread? Because the title has nothing to do
with the question. See:
http://people.apache.org/~hossman/#threadhijack

When starting a new discussion on a mailing list, please do not reply to
an existing message, instead start a fresh email.  Even if you change the
subject line of your email, other mail headers still track which thread
you replied to and your question is "hidden" in that thread and gets less
attention.   It makes following discussions in the mailing list archives
particularly difficult.

And assuming your question is important here and not the title, see:
http://lucidworks.com/blog/solr-suggester/

Best,
Erick

On Thu, Aug 13, 2015 at 11:33 PM, Nutch Solr User
 wrote:
>  I want to use AnalyzingInfixLookupFactory for my autosuggestions.
>
> Any idea when this issue will get fixed? Do we have any workaround for this
> issue.
>
>
>
> -
> Nutch Solr User
>
> "The ultimate search engine would basically understand everything in the 
> world, and it would always give you the right thing."
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Solr-suggester-throws-error-on-core-reload-tp4220725p4222902.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Adding additional file types for indexing

2015-08-14 Thread coolmals
Thanks for your response. I used the -Dfiletypes=* when executing post.jar
but png image files alone are not getting indexed. It gives 400 error




400
1


missing content stream
400



Can you let me know if there is any seperate configuration for png images?
other images like jpg seems to be indexed well.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Adding-additional-file-types-for-indexing-tp4222845p4222977.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Adding additional file types for indexing

2015-08-14 Thread Erik Hatcher
Be careful with an unquoted * - try quoting it.  (I was trying to be precise in 
my reply by quoting it but should have called that out as a potential issue)


—
Erik Hatcher, Senior Solutions Architect
http://www.lucidworks.com 




> On Aug 14, 2015, at 10:40 AM, coolmals  wrote:
> 
> Thanks for your response. I used the -Dfiletypes=* when executing post.jar
> but png image files alone are not getting indexed. It gives 400 error
> 
> 
> 
> 
> 400
> 1
> 
> 
> missing content stream
> 400
> 
> 
> 
> Can you let me know if there is any seperate configuration for png images?
> other images like jpg seems to be indexed well.
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Adding-additional-file-types-for-indexing-tp4222845p4222977.html
> Sent from the Solr - User mailing list archive at Nabble.com.



Re: Adding additional file types for indexing

2015-08-14 Thread coolmals
Ok. Quoting also doesnt seem to fix the png image issue. Any idea on indexing
png images?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Adding-additional-file-types-for-indexing-tp4222845p4222987.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Adding additional file types for indexing

2015-08-14 Thread Erik Hatcher
Not sure how exactly you’re trying it, so let’s talk concretely with examples 
here:


  $ bin/solr create -c tmp
  $ bin/post -c tmp ~/Desktop/bin_post_featured_image.png -filetypes “*"

  $ curl "http://localhost:8983/solr/tmp/select?q=*:*&wt=csv&fl=id";
  id
  "/Users/erikhatcher/Desktop/bin_post_featured_image.png”


There’s probably an issue in there somewhere, but it does work with the above.

I wasn’t able to get *this* to work though:

  $ bin/post -c tmp http://lucene.apache.org/solr/assets/images/book_sia.png 
-filetypes “*”
 ...
  Entering auto mode. Indexing pages with content-types corresponding to file 
endings *
  Entering crawl at level 0 (1 links total, 1 new)
  SimplePostTool: WARNING: Skipping URL with unsupported type image/png

So something needs fixing in web crawl mode it looks like.

—
Erik Hatcher, Senior Solutions Architect
http://www.lucidworks.com




> On Aug 14, 2015, at 11:10 AM, coolmals  wrote:
> 
> Ok. Quoting also doesnt seem to fix the png image issue. Any idea on indexing
> png images?
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Adding-additional-file-types-for-indexing-tp4222845p4222987.html
> Sent from the Solr - User mailing list archive at Nabble.com.



Issue while setting Solr on Slider / YARN

2015-08-14 Thread Vijay Bhoomireddy
Hi,

 

We have a requirement of setting up of Solr Cloud to work along with Hadoop.
Earlier, I could setup a SolrCloud cluster separately alongside the Hadoop
cluster i.e. it looks like two logical  clusters sitting next to each other,
both relying on HDFS.

 

However, the experiment now I am trying to do is to install SolrCloud on
YARN using Apache Slider. I am following LucidWorks blog at
https://github.com/LucidWorks/solr-slider for the same. I already have a
Hortonworks HDP cluster. When I try to setup Solr on my HDP cluster using
Slider, I am facing some issues.

 

As per the blog, I have performed the below steps:

 

1.   I have setup a single node HDP cluster for which the hostname is
myhdpcluster.com with all the essential services including ZooKeeper and
Slider running on it.

2.   Updated the resource manager address and port in slider-client.xml
present under /var/hdp/current/slider/conf



yarn.resourcemanager.address

 myhdpcluster.com:8032



3.   Cloned the LucidWorks git and moved it under /user/hdfs/solr-slider

4.   Downloaded solr latest stable distribution and renamed it as
solr.tgz and placed it under /user/hdfs/solr-slider/package/files/solr.tgz

5.   Next ran the following command from within the
/user/hdfs/solr-slider folder

zip -r solr-on-yarn.zip metainfo.xml package/

6.   Next ran the following command as hdfs user

slider install-package --replacepkg --name solr --package
/user/hdfs/solr-slider/solr-on-yarn.zip

7.   Modified the following settings in the
/user/hdfs/solr-slider/appConfig-default.json file

"java_home": MY_JAVA_HOME_LOCATION

"site.global.app_root": "${AGENT_WORK_ROOT}/app/install/solr-5.2.1",
(Should this be changed to any other value?)

"site.global.zk_host": " myhdpcluster.com:2181",

8.   Set yarn.component.instances to 1 in resources-default.json file

9.   Next ran the following command

slider create solr --template /user/hdfs/solr-slider/appConfig-default.json
--resources /user/hdfs/solr-slider/resources-default.json

 

During this step, I am seeing an message INFO client.RMProxy - Connecting to
ResourceManager at myhdpcluster.com/10.0.2.15:8032 

 
INFO ipc.Client - Retrying connect to server:
myhdpcluster.com/10.0.2.15:8032. Already tried 0 time(s); 

 

This message keeps repeating for 50 times and then pauses for a couple of
seconds and then prints the same message in a loop eternally. Not sure on
where the problem is.

 

Can anyone please help me out to get away from this issue and help me setup
Solr on Slider/YARN?

 

Thanks & Regards

Vijay

 

Vijay Bhoomireddy, Big Data Architect

1000 Great West Road, Brentford, London, TW8 9DW

T:  +44 20 3475 7980

M: +44 7481 298 360

W:   ww 
w.whishworks.com

 


-- 
The contents of this e-mail are confidential and for the exclusive use of 
the intended recipient. If you receive this e-mail in error please delete 
it from your system immediately and notify us either by e-mail or 
telephone. You should not copy, forward or otherwise disclose the content 
of the e-mail. The views expressed in this communication may not 
necessarily be the view held by WHISHWORKS.


Solr relevant results

2015-08-14 Thread Brian Narsi
In my documents there are several fields, but for example say there are
three fields:

Description - text  - this variable text
Code - string - always a single character
Prefer - boolean

User searches on Description.

When returning results I have to order results as following:

Code = C
Code = B
Code = S
Code = N
Prefer = true and Code is NULL
Prefer = false and Code is NULL
Prefer is NULL and Code is NULL

How can this be achieved?

Thanks in advance!


Re: Solr relevant results

2015-08-14 Thread Alexandre Rafalovitch
What's the search string? Or is the search string irrelevant and
that's just your compulsory ordering.
Assuming anything that searches has to be returned and has to fit into
that order, I would frankly just map your special codes all together
to some sort of 'sort order' number.

So, Code=>C = 4000, Code =>B=3000. Prefer=true=>100, Prefer=false=>0.
Then, sum it up. Or some such.

Remember that fuzzy search will match even things with low probability
so a fixed sort will bring low-probability matches on top. So, either
hard non-fuzzy searches or you need to look at different solutions,
such as buckets and top-n items within those.

Regards,
Alex.

Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
http://www.solr-start.com/


On 14 August 2015 at 15:10, Brian Narsi  wrote:
> In my documents there are several fields, but for example say there are
> three fields:
>
> Description - text  - this variable text
> Code - string - always a single character
> Prefer - boolean
>
> User searches on Description.
>
> When returning results I have to order results as following:
>
> Code = C
> Code = B
> Code = S
> Code = N
> Prefer = true and Code is NULL
> Prefer = false and Code is NULL
> Prefer is NULL and Code is NULL
>
> How can this be achieved?
>
> Thanks in advance!


Re: Adding additional file types for indexing

2015-08-14 Thread Erik Hatcher
I opened https://issues.apache.org/jira/browse/SOLR-7929 
 for the issue below.

—
Erik Hatcher, Senior Solutions Architect
http://www.lucidworks.com 




> On Aug 14, 2015, at 11:28 AM, Erik Hatcher  wrote:
> 
> Not sure how exactly you’re trying it, so let’s talk concretely with examples 
> here:
> 
> 
>  $ bin/solr create -c tmp
>  $ bin/post -c tmp ~/Desktop/bin_post_featured_image.png -filetypes “*"
> 
>  $ curl "http://localhost:8983/solr/tmp/select?q=*:*&wt=csv&fl=id";
>  id
>  "/Users/erikhatcher/Desktop/bin_post_featured_image.png”
> 
> 
> There’s probably an issue in there somewhere, but it does work with the above.
> 
> I wasn’t able to get *this* to work though:
> 
>  $ bin/post -c tmp http://lucene.apache.org/solr/assets/images/book_sia.png 
> -filetypes “*”
> ...
>  Entering auto mode. Indexing pages with content-types corresponding to file 
> endings *
>  Entering crawl at level 0 (1 links total, 1 new)
>  SimplePostTool: WARNING: Skipping URL with unsupported type image/png
> 
> So something needs fixing in web crawl mode it looks like.
> 
> —
> Erik Hatcher, Senior Solutions Architect
> http://www.lucidworks.com
> 
> 
> 
> 
>> On Aug 14, 2015, at 11:10 AM, coolmals  wrote:
>> 
>> Ok. Quoting also doesnt seem to fix the png image issue. Any idea on indexing
>> png images?
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://lucene.472066.n3.nabble.com/Adding-additional-file-types-for-indexing-tp4222845p4222987.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
> 



Re: FW: Performance warning overlapping onDeckSearchers

2015-08-14 Thread Shawn Heisey
On 8/11/2015 6:15 AM, Adrian Liew wrote:
> I am not sure if you know much about the Sitecore WCMS Platform and we
> are experiencing some issues reported by Solr Admin with regards to
> the following when we try to publish some content in order to trigger
> an index update to our sitecore_web_index SolrCore:
>
>  
>
> 1. 8/11/2015, 7:46:26 PM
>
> WARN
>
> null
>
> SolrCore
>
> [sitecore_master_index] Error opening new searcher. exceeded limit of
> maxWarmingSearchers=2,​ try again later.
>
>
> 2. 8/11/2015, 7:46:26 PM
>
> ERROR
>
> null
>
> SolrCore
>
> org.apache.solr.common.SolrException: Error opening new searcher.
> exceeded limit of maxWarmingSearchers=2,​ try again later.
>
>  
>
> I also noticed that I had been receiving a quick succession of commits
> over time which I think is causing the above. I read somewhere in one
> of your articles after googling abit on the problem, and you did
> mention enabling autocommits may work?
>

First, a little housekeeping regarding the way this message found its
way to me:

http://people.apache.org/~hossman/#private_q

I'm redirecting this reply to the list (with a bcc to you) because
there's nothing sensitive in your question or my reply, and this
information may help others.

Those log messages are almost always caused by committing too
frequently.  Specifically, commits with openSearcher=true (which is the
default), which makes changes to the index visible to queries.  The
commits need to be adjusted so they are as infrequent as you can
possibly make them.

A bunch of good information about commits and their pitfalls can be
found here:

http://lucidworks.com/blog/understanding-transaction-logs-softcommit-and-commit-in-sorlcloud/

In particular, pay attention to the part about not listening your
product manager who says "we need no more than 1 second latency".  This
is a common design requirement passed down from managers and executives
who have no idea how a search index works.  When actual user behavior
and expectations are considered, making changes visible within one
minute or five minutes is usually enough.  Even for unusual situations,
ten or fifteen seconds of latency is usually OK.

I checked the solr-user list history for your message threads, and tried
to find this Sitecore software you mentioned.  It appears that even
downloading the binary requires registration, which I'm not going to do
for software I have no plans to use myself, and I'm more interested in
the source code than the binary.  I couldn't find any source code.  It
looks like this is a commercial product that doesn't provide code.

Are there any commit-related settings in your configuration for the
sitecore product?  I found this:

http://www.sitecore.net/learn/blogs/technical-blogs/sitecore-7-development-team/posts/2013/04/sitecore-7-commit-policies.aspx

Regardless of what happens with this message and its replies, I
recommend that you open a trouble ticket with Sitecore, since there is
probably a good chance that you've paid them for their software.  If
they are competent, they will know about how Solr commits work and will
have some suggestions for you to try.

If it turns out that the Sitecore commit settings are reasonable, then
the problem is likely happening because commits are happening very
slowly.  We may need to look into how you can improve general Solr
performance.  There is a very small amount of information about slow
commits on this page:

https://wiki.apache.org/solr/SolrPerformanceProblems#Slow_commits

Thanks,
Shawn



Re: Solr relevant results

2015-08-14 Thread Brian Narsi
Search term is searched in Description.

The search string is relevant in the context that the Description of
returned records must contain the search string. But when several records
Description contains the search string then they must be ordered according
to the values in Code and Prefer.

I understand what you are saying about mapping Code to numbers. But can you
help with some examples of actual solr queries on how to do this?

Thanks

On Fri, Aug 14, 2015 at 2:46 PM, Alexandre Rafalovitch 
wrote:

> What's the search string? Or is the search string irrelevant and
> that's just your compulsory ordering.
> Assuming anything that searches has to be returned and has to fit into
> that order, I would frankly just map your special codes all together
> to some sort of 'sort order' number.
>
> So, Code=>C = 4000, Code =>B=3000. Prefer=true=>100, Prefer=false=>0.
> Then, sum it up. Or some such.
>
> Remember that fuzzy search will match even things with low probability
> so a fixed sort will bring low-probability matches on top. So, either
> hard non-fuzzy searches or you need to look at different solutions,
> such as buckets and top-n items within those.
>
> Regards,
> Alex.
> 
> Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
> http://www.solr-start.com/
>
>
> On 14 August 2015 at 15:10, Brian Narsi  wrote:
> > In my documents there are several fields, but for example say there are
> > three fields:
> >
> > Description - text  - this variable text
> > Code - string - always a single character
> > Prefer - boolean
> >
> > User searches on Description.
> >
> > When returning results I have to order results as following:
> >
> > Code = C
> > Code = B
> > Code = S
> > Code = N
> > Prefer = true and Code is NULL
> > Prefer = false and Code is NULL
> > Prefer is NULL and Code is NULL
> >
> > How can this be achieved?
> >
> > Thanks in advance!
>


Re: Solr relevant results

2015-08-14 Thread Alexandre Rafalovitch
My suggestion was to do the mapping in the client, before you hit
Solr. Or in a custom UpdateRequestProcessor. Because only your client
app knows the order you want those things in. It certainly was not any
kind of alphabetical.

Then, you just sort by that field and Solr would not care about the
complicated rules. Faster that way too, as the mapping only happens
once when the document is indexed.

Regards,
   Alex.

Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
http://www.solr-start.com/


On 14 August 2015 at 23:52, Brian Narsi  wrote:
> Search term is searched in Description.
>
> The search string is relevant in the context that the Description of
> returned records must contain the search string. But when several records
> Description contains the search string then they must be ordered according
> to the values in Code and Prefer.
>
> I understand what you are saying about mapping Code to numbers. But can you
> help with some examples of actual solr queries on how to do this?
>
> Thanks
>
> On Fri, Aug 14, 2015 at 2:46 PM, Alexandre Rafalovitch 
> wrote:
>
>> What's the search string? Or is the search string irrelevant and
>> that's just your compulsory ordering.
>> Assuming anything that searches has to be returned and has to fit into
>> that order, I would frankly just map your special codes all together
>> to some sort of 'sort order' number.
>>
>> So, Code=>C = 4000, Code =>B=3000. Prefer=true=>100, Prefer=false=>0.
>> Then, sum it up. Or some such.
>>
>> Remember that fuzzy search will match even things with low probability
>> so a fixed sort will bring low-probability matches on top. So, either
>> hard non-fuzzy searches or you need to look at different solutions,
>> such as buckets and top-n items within those.
>>
>> Regards,
>> Alex.
>> 
>> Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
>> http://www.solr-start.com/
>>
>>
>> On 14 August 2015 at 15:10, Brian Narsi  wrote:
>> > In my documents there are several fields, but for example say there are
>> > three fields:
>> >
>> > Description - text  - this variable text
>> > Code - string - always a single character
>> > Prefer - boolean
>> >
>> > User searches on Description.
>> >
>> > When returning results I have to order results as following:
>> >
>> > Code = C
>> > Code = B
>> > Code = S
>> > Code = N
>> > Prefer = true and Code is NULL
>> > Prefer = false and Code is NULL
>> > Prefer is NULL and Code is NULL
>> >
>> > How can this be achieved?
>> >
>> > Thanks in advance!
>>


Re: Solr relevant results

2015-08-14 Thread Alexandre Rafalovitch
Clarification: In the client that is doing the _indexing_/sending data
to Solr. Not the one doing the querying.

And custom URP if you can't change the client and need to inject that
extra code on the Solr side.

Sorry, for extra emails.

Regards,
   Alex.

Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
http://www.solr-start.com/


On 14 August 2015 at 23:57, Alexandre Rafalovitch  wrote:
> My suggestion was to do the mapping in the client, before you hit
> Solr. Or in a custom UpdateRequestProcessor. Because only your client
> app knows the order you want those things in. It certainly was not any
> kind of alphabetical.
>
> Then, you just sort by that field and Solr would not care about the
> complicated rules. Faster that way too, as the mapping only happens
> once when the document is indexed.
>
> Regards,
>Alex.
> 
> Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
> http://www.solr-start.com/
>
>
> On 14 August 2015 at 23:52, Brian Narsi  wrote:
>> Search term is searched in Description.
>>
>> The search string is relevant in the context that the Description of
>> returned records must contain the search string. But when several records
>> Description contains the search string then they must be ordered according
>> to the values in Code and Prefer.
>>
>> I understand what you are saying about mapping Code to numbers. But can you
>> help with some examples of actual solr queries on how to do this?
>>
>> Thanks
>>
>> On Fri, Aug 14, 2015 at 2:46 PM, Alexandre Rafalovitch 
>> wrote:
>>
>>> What's the search string? Or is the search string irrelevant and
>>> that's just your compulsory ordering.
>>> Assuming anything that searches has to be returned and has to fit into
>>> that order, I would frankly just map your special codes all together
>>> to some sort of 'sort order' number.
>>>
>>> So, Code=>C = 4000, Code =>B=3000. Prefer=true=>100, Prefer=false=>0.
>>> Then, sum it up. Or some such.
>>>
>>> Remember that fuzzy search will match even things with low probability
>>> so a fixed sort will bring low-probability matches on top. So, either
>>> hard non-fuzzy searches or you need to look at different solutions,
>>> such as buckets and top-n items within those.
>>>
>>> Regards,
>>> Alex.
>>> 
>>> Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
>>> http://www.solr-start.com/
>>>
>>>
>>> On 14 August 2015 at 15:10, Brian Narsi  wrote:
>>> > In my documents there are several fields, but for example say there are
>>> > three fields:
>>> >
>>> > Description - text  - this variable text
>>> > Code - string - always a single character
>>> > Prefer - boolean
>>> >
>>> > User searches on Description.
>>> >
>>> > When returning results I have to order results as following:
>>> >
>>> > Code = C
>>> > Code = B
>>> > Code = S
>>> > Code = N
>>> > Prefer = true and Code is NULL
>>> > Prefer = false and Code is NULL
>>> > Prefer is NULL and Code is NULL
>>> >
>>> > How can this be achieved?
>>> >
>>> > Thanks in advance!
>>>


Re: Solr relevant results

2015-08-14 Thread Brian Narsi
I see, so basically I add another field to the schema "CustomScore" and
assign score to it based on values in other fields. And then just order by
it.

Is that right?

On Fri, Aug 14, 2015 at 10:58 PM, Alexandre Rafalovitch 
wrote:

> Clarification: In the client that is doing the _indexing_/sending data
> to Solr. Not the one doing the querying.
>
> And custom URP if you can't change the client and need to inject that
> extra code on the Solr side.
>
> Sorry, for extra emails.
>
> Regards,
>Alex.
> 
> Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
> http://www.solr-start.com/
>
>
> On 14 August 2015 at 23:57, Alexandre Rafalovitch 
> wrote:
> > My suggestion was to do the mapping in the client, before you hit
> > Solr. Or in a custom UpdateRequestProcessor. Because only your client
> > app knows the order you want those things in. It certainly was not any
> > kind of alphabetical.
> >
> > Then, you just sort by that field and Solr would not care about the
> > complicated rules. Faster that way too, as the mapping only happens
> > once when the document is indexed.
> >
> > Regards,
> >Alex.
> > 
> > Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
> > http://www.solr-start.com/
> >
> >
> > On 14 August 2015 at 23:52, Brian Narsi  wrote:
> >> Search term is searched in Description.
> >>
> >> The search string is relevant in the context that the Description of
> >> returned records must contain the search string. But when several
> records
> >> Description contains the search string then they must be ordered
> according
> >> to the values in Code and Prefer.
> >>
> >> I understand what you are saying about mapping Code to numbers. But can
> you
> >> help with some examples of actual solr queries on how to do this?
> >>
> >> Thanks
> >>
> >> On Fri, Aug 14, 2015 at 2:46 PM, Alexandre Rafalovitch <
> arafa...@gmail.com>
> >> wrote:
> >>
> >>> What's the search string? Or is the search string irrelevant and
> >>> that's just your compulsory ordering.
> >>> Assuming anything that searches has to be returned and has to fit into
> >>> that order, I would frankly just map your special codes all together
> >>> to some sort of 'sort order' number.
> >>>
> >>> So, Code=>C = 4000, Code =>B=3000. Prefer=true=>100, Prefer=false=>0.
> >>> Then, sum it up. Or some such.
> >>>
> >>> Remember that fuzzy search will match even things with low probability
> >>> so a fixed sort will bring low-probability matches on top. So, either
> >>> hard non-fuzzy searches or you need to look at different solutions,
> >>> such as buckets and top-n items within those.
> >>>
> >>> Regards,
> >>> Alex.
> >>> 
> >>> Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
> >>> http://www.solr-start.com/
> >>>
> >>>
> >>> On 14 August 2015 at 15:10, Brian Narsi  wrote:
> >>> > In my documents there are several fields, but for example say there
> are
> >>> > three fields:
> >>> >
> >>> > Description - text  - this variable text
> >>> > Code - string - always a single character
> >>> > Prefer - boolean
> >>> >
> >>> > User searches on Description.
> >>> >
> >>> > When returning results I have to order results as following:
> >>> >
> >>> > Code = C
> >>> > Code = B
> >>> > Code = S
> >>> > Code = N
> >>> > Prefer = true and Code is NULL
> >>> > Prefer = false and Code is NULL
> >>> > Prefer is NULL and Code is NULL
> >>> >
> >>> > How can this be achieved?
> >>> >
> >>> > Thanks in advance!
> >>>
>


Re: Solr suggester throws error on core reload.

2015-08-14 Thread Nutch Solr User
Hi Erick,

Sorry for the confusion caused, Next time will be more careful while posting
questions in forum.

Actually we are using AnalyzingInfixLookupFactory for auto-suggestions. And
currently is has open issue with core reload
(https://issues.apache.org/jira/browse/SOLR-6246). So my question was
related to resolution of this issue.



-
Nutch Solr User

"The ultimate search engine would basically understand everything in the world, 
and it would always give you the right thing."
--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-suggester-throws-error-on-core-reload-tp4220725p4223098.html
Sent from the Solr - User mailing list archive at Nabble.com.