Many to Many Mapping with Solr

2016-04-29 Thread Sandeep Mestry
Hi All, Hope the day is going on well for you. This question has been asked before, but I couldn't find answer to my specific request. I have many to many relationship and the mapping table has additional columns. Whats the best way I can model this into solr entity? For example: a user has many

Re: Many to Many Mapping with Solr

2016-05-01 Thread Sandeep Mestry
t; search and you recreate the m-to-m object structure from the database. > > Then, you don't need to store much at all, just index. > > > > Basically, don't think about your database as much when deciding Solr > > structure. It does not map one-to-one. > > > > Regar

Re: Sorting in solr

2016-07-11 Thread Sandeep Mestry
Hi Naveen, I am not too sure what you're after but the sorting mechanism is applied after search results are fetched. >From Solr Ref Guide: https://cwiki.apache.org/confluence/display/solr/Common+Query+Parameters#CommonQueryParameters-ThesortParameter The sort parameter *arranges search results*

Re: Dot operater issue.

2013-06-27 Thread Sandeep Mestry
Hi Sri, This depends on how the fields (that hold the value) are defined and how the query is generated. Try running the query in solr console and use &debug=true to see how the query string is getting parsed. If that doesn't help then could you answer following 3 questions relating to your quest

Re: Newbie SolR - Need advice

2013-07-02 Thread Sandeep Mestry
Hi Fabio, No, Solr isn't the database replacement for MS SQL. Solr is built on top of Lucene which is a search engine library for text searches. Solr in itself is not a replacement for any database as it does not support any relational db features, however as Jack and David mentioned its fully op

Re: Newbie SolR - Need advice

2013-07-02 Thread Sandeep Mestry
Hi Fabio, Yes, you're on right track. I'd like to now direct you to first reply from Jack to go through solr tutorial. Even with Solr,, it will take some time to learn various bits and pieces about designing fields, their field types, server configuration, etc. and then tune the results to match

Re: Newbie SolR - Need advice

2013-07-03 Thread Sandeep Mestry
+1 On 3 July 2013 14:58, Jack Krupansky wrote: > Design your own application layer for both indexing and query that knows > about both SQL and Solr. Give it a REST API and then your client > applications can talk to your REST API and not have to care about the > details of Solr or SQL. That's t

Question on Exact Matches - edismax

2013-04-03 Thread Sandeep Mestry
Hi All, I have a requirement where in exact matches for 2 fields (Series Title, Title) should be ranked higher than the partial matches. The configuration looks like below: edismax explicit 0.01 *pg_series_title_ci*^500 *title_ci*^300 * pg

Re: Question on Exact Matches - edismax

2013-04-04 Thread Sandeep Mestry
.com > Solr Training - www.solrtraining.com > > 3. apr. 2013 kl. 15:55 skrev Sandeep Mestry : > > > Hi All, > > > > I have a requirement where in exact matches for 2 fields (Series Title, > > Title) should be ranked higher than the partial matches. The > configurat

Re: Question on Exact Matches - edismax

2013-04-04 Thread Sandeep Mestry
** * * *Can this copyfield directive be an issue? Should it be other way round or does it matter?* Thanks, Sandeep On 4 April 2013 10:38, Sandeep Mestry wrote: > Hi Jan, > > Thanks for your reply. I have defined string_ci like below: > > omitNorm

Re: Exact matching in Solr 3.6.1

2013-04-25 Thread Sandeep Mestry
Hi Pawel, Not sure which parser you are using, I am using edismax and tried using the bq parameter to boost the results having exact matches at the top. You may try something like: q="cats" AND London NOT Leeds&bq="cats"^50 In edismax, pf and pf2 parameters also need some tuning to get the result

Re: Exact matching in Solr 3.6.1

2013-04-25 Thread Sandeep Mestry
I think in that case, making a field String type is your option, however remember that it'd be case sensitive. Another approach is to create a case insensitive field type and doing searches on those fields only. Can you provide your fie

Re: Exact matching in Solr 3.6.1

2013-04-25 Thread Sandeep Mestry
Agree with Jack. The current field type text_general is designed to match the query tokens instead of exact matches - so it's not able to fulfill your requirements. Can you use flat file as spell check dictionary instead and that way you can sear

Exact and Partial Matches

2013-04-29 Thread Sandeep Mestry
Dear Experts, I have a requirement for the exact matches and applying alphabetical sorting thereafter. To illustrate, the results should be sorted in exact matches and all later alphabetical. So, if there are 5 documents as below Doc1 title: trees Doc 2 title: plum trees Doc 3 title: Money Tr

Custom sorting of Solr Results

2013-04-30 Thread Sandeep Mestry
Dear Experts, > > I have a requirement for the exact matches and applying alphabetical > sorting thereafter. > > To illustrate, the results should be sorted in exact matches and all later > alphabetical. > > So, if there are 5 documents as below > > Doc1 > title: trees > > Doc 2 > title: plum tree

Re: Exact and Partial Matches

2013-04-30 Thread Sandeep Mestry
> grouping, but I doubt it. > > You'll need two queries I'd guess. > > Best > Erick > > On Mon, Apr 29, 2013 at 9:44 AM, Sandeep Mestry > wrote: > > Dear Experts, > > > > I have a requirement for the exact matches and applying alphabetical &g

Re: commit in solr4 takes a longer time

2013-05-02 Thread Sandeep Mestry
Hi Vicky, I faced this issue as well and after some playing around I found the autowarm count in cache sizes to be a problem. I changed that from a fixed count (3072) to percentage (10%) and all commit times were stable then onwards. HTH, Sandeep On 2 May 2013 16:31, Alexandre Rafalovitch

Re: commit in solr4 takes a longer time

2013-05-03 Thread Sandeep Mestry
That's not ideal. Can you post solrconfig.xml? On 3 May 2013 07:41, "vicky desai" wrote: > Hi sandeep, > > I made the changes u mentioned and tested again for the same set of docs > but > unfortunately the commit time increased. > > > > -- > View this message in context: > http://lucene.472066.n3

Solr Sorting Algorithm

2013-05-13 Thread Sandeep Mestry
Good Morning All, The alphabetical sorting is causing slight issues as below: I have 3 documents with title value as below: 1) "Acer Palmatum (Tree)" 2) "Aceraceae (Tree Family)" 3) "Acer Pseudoplatanus (Tree)" I have created title_sort field which is defined with field type as alphaNumericalSo

Question about Edismax - Solr 4.0

2013-05-16 Thread Sandeep Mestry
-- *Edismax and Filter Queries with Commas and spaces* -- Dear Experts, This appears to be a bug, please suggest if I'm wrong. If I search with the following filter query, 1) fq=title:(, 10) - I get no results. - The debug output does NOT show the section containing parsed_filter_queries if I

Re: Question about Edismax - Solr 4.0

2013-05-16 Thread Sandeep Mestry
arentheses.) > > Let us know what your symptom is though, first. > > I mean, the filter query looks perfectly reasonable from an abstract > perspective. > > -- Jack Krupansky > > -Original Message- From: Sandeep Mestry > Sent: Thursday, May 16, 2013 6:51 A

Re: Question about Edismax - Solr 4.0

2013-05-16 Thread Sandeep Mestry
queries at > query time, so set them to "0" in the query analyzer > > Also, make sure you have autoGeneratePhraseQueries="**true" on the field > type, but that's not the issue here. > > > -- Jack Krupansky > > -Original Message- From: Sandeep Mestry > Sent

Re: Question about Edismax - Solr 4.0

2013-05-17 Thread Sandeep Mestry
rateWordParts="1" generateNumberParts="1" > catenateWords="0" catenateNumbers="0" catenateAll="0" > splitOnCaseChange="1" splitOnNumerics="0" preserveOriginal="0" /> > > > -- Jack Krupansky > > -Original Messa

Highlight only when all keywords match

2013-05-20 Thread Sandeep Mestry
Dear All, I have a requirement to highlight a field only when all keywords entered match. This also needs to support phrase, operator or wildcard queries. I'm using Solr 4.0 with edismax because the search needs to be carried out on multiple fields. I know with highlighting feature I can configure

Re: Highlight only when all keywords match

2013-05-20 Thread Sandeep Mestry
* terms match. Thanks, Sandeep On 20 May 2013 11:40, Jaideep Dhok wrote: > Sandeep, > If you AND all keywords, that should be OK? > > Thanks > Jaideep > > > On Mon, May 20, 2013 at 3:44 PM, Sandeep Mestry > wrote: > > > Dear All, > > > > I have

Re: Highlight only when all keywords match

2013-05-20 Thread Sandeep Mestry
ds that you have to search) > (f1:kw1 AND f1:kw2 ... f1:kwn) OR (f2:kw1 AND f2:kw2 ... f2:kwn) > > - > Jaideep > > > On Mon, May 20, 2013 at 4:22 PM, Sandeep Mestry > wrote: > > > Hi Jaideep, > > > > The edismax config I have posted mentioned that the def

Re: Highlight only when all keywords match

2013-05-20 Thread Sandeep Mestry
ementation that you can include in your Solr setup. Or, if > you make it generic enough, offer it back as a contribution that can be > included in future Solr releases. > > Upayavira > > On Mon, May 20, 2013, at 12:14 PM, Sandeep Mestry wrote: > > I doubt if that will be the

Solr 4.0 war startup issue - apache-solr-core.jar Vs solr-core

2013-05-20 Thread Sandeep Mestry
Hi All, I want to override a component from solr-core and for that I need solr-core jar. I am using the solr.war that comes from Apache mirror and if I open the war, I see the solr-core jar is actually named as apache-solr-core.jar. This is also true about solrj jar. If I now provide a dependenc

Re: Solr 4.0 war startup issue - apache-solr-core.jar Vs solr-core

2013-05-21 Thread Sandeep Mestry
wever I do not think this is the ideal solution. Thanks, Sandeep On 20 May 2013 15:18, Shawn Heisey wrote: > On 5/20/2013 8:01 AM, Sandeep Mestry wrote: > > And I do remember the discussion on the forum about dropping the name > > *apache* from solr jars. If that's what c

Re: Solr 4.0 war startup issue - apache-solr-core.jar Vs solr-core

2013-05-21 Thread Sandeep Mestry
Hi Steve, Solr 4.0 - mentioned in the subject.. :-) Thanks, Sandeep On 21 May 2013 14:58, Steve Rowe wrote: > Sandeep, > > What version of Solr are you using? > > Steve > > On May 21, 2013, at 6:55 AM, Sandeep Mestry wrote: > > > Hi Shawn, > > > &

Re: Solr 4.0 war startup issue - apache-solr-core.jar Vs solr-core

2013-05-21 Thread Sandeep Mestry
hanks, Sandeep On 21 May 2013 16:46, Steve Rowe wrote: > The 4.0 solr-core jar is available in Maven Central: < > http://search.maven.org/#artifactdetails%7Corg.apache.solr%7Csolr-core%7C4.0.0%7Cjar > > > > Steve > > On May 21, 2013, at 11:26 AM, Sandeep Mestry wrote:

Re: Boosting Documents

2013-05-22 Thread Sandeep Mestry
Hi Oussama, This is explained very nicely on Solr Wiki.. http://wiki.apache.org/solr/SolrRelevancyFAQ#index-time_boosts http://wiki.apache.org/solr/UpdateXmlMessages#Optional_attributes_for_.22add.22 All you need to do is something similar to below.. - 05991 Bridgewater What i

Re: Boosting Documents

2013-05-22 Thread Sandeep Mestry
e queries results has the same score even if they >> had been indexed with different boosts, and I can't sort on another field >> since this is independent from any field value. >> >> Any ideas ? >> >> On 05/22/2013 10:30 AM, Sandeep Mestry wrote: >> >>>

Re: Boosting Documents

2013-05-22 Thread Sandeep Mestry
/> > > > Id > **Suggestion >| > > My query is somthing like : Suggestion:"Olive Oil". > > The result is 9 documents, wich all has the same score "11.287682", even > if they had been indexed with

Re: Boosting Documents

2013-05-22 Thread Sandeep Mestry
ifferent types but only > one value is indexed in them (so no multiValue is required and it works > perfectly). > > > > > On 05/22/2013 11:18 AM, Sandeep Mestry wrote: > >> Did you use the debugQuery=true in solr console to see how the query is >> being interpret

Re: Solr 4.0 war startup issue - apache-solr-core.jar Vs solr-core

2013-05-22 Thread Sandeep Mestry
tro and use the jars there. But I'd > be _really_ cautious about using a 4.1 or later jar with 4.0. > > FWIW, > Erick > > On Tue, May 21, 2013 at 12:05 PM, Sandeep Mestry > wrote: > > Thanks Steve, > > > > I could find solr-core.jar in the repo but could

Re: Solr Faceting doesn't return values.

2013-05-22 Thread Sandeep Mestry
Hi There, Not sure I understand your problem correctly, but is 'mm_state_code' a real value or is it field name? Also, as Erick pointed out above, the facets are not calculated if there are no results. Hence you get no facets. You have mentioned which facets you want but you haven't mentioned whi

Re: filter query by string length or word count?

2013-05-22 Thread Sandeep Mestry
I doubt if there is any straight out of the box feature that supports this requirement, you will probably need to handle this at the index time. You can play around with Function Queries http://wiki.apache.org/solr/FunctionQuery for any such feature. On 22 May 2013 16:37, Sam Lee wrote: > I ha

Re: Solr Faceting doesn't return values.

2013-05-22 Thread Sandeep Mestry
>From the response you've mentioned it appears to me that the query term TX is searched against sa_site_city instead of mm_state_code. Can you try your query like below: http://xx.xx.xx.xx/solr/collection1/select?q=*mm_state_code:(**TX)* &wt=xml&indent=true&facet=true&facet.field=sa_site_city&debu

Re: Solr Faceting doesn't return values.

2013-05-23 Thread Sandeep Mestry
*org.apache.solr.search.SyntaxError: Cannot parse '*mm_state_code:(**TX)*': Encountered " ":" ": "" at line 1, column 14. Was expecting one of:* This suggests to me that you kept the df parameter in the query hence it was forming mm_state_code:mm_state_code:(TX), can you try exactly they way I gav

Solr 4.2.1 + Distribution scripts (rsync) Issue

2013-06-04 Thread Sandeep Mestry
Dear All, *Background:* I have recently upgraded solr from 4.0 to 4.2.1 and have re-indexed all the data. All good so far, we received better query time, lesser index size and now it looks all shiny and nice. However, we haven't yet implemented SolrCloud and still relying on distribution scripts -

Re: Solr 4.2.1 + Distribution scripts (rsync) Issue

2013-06-05 Thread Sandeep Mestry
Hi Hoss, Thanks for your reply, Please find answers to your questions below. *Well, for starters -- have you considered at least looking into using the java based Replicationhandler instead of the rsync scripts?* - There was an attempt to to implement java based replication but it was very slow a

Re: Does SolrCloud support distributed IDFs?

2012-11-28 Thread Sandeep Mestry
Dear All, Can anyone suggest how long it will take to get SOLR-1632 patch into Solr 4? Also, it'd be good if someone has used any alternate method like Ultraseek XPA Java library to calculate the distributed ranking? Many Thanks, Sandeep On 22 October 2012 13:23, Sascha SZOTT wrote: > Hi Mark

Solr 4 : Optimize very slow

2012-12-04 Thread Sandeep Mestry
Hi All, I have recently migrated from solr 1.4 to solr 4 and have done the basic changes required for solr 4 in solrconfig.xml and schema.xml. I have also rebuilt the index set for solr 4. We run optimize every morning at 4 am and we keep the index updates off during this process. Previously, with

Re: Solr 4 : Optimize very slow

2012-12-05 Thread Sandeep Mestry
WAS really AWS? If so, if these are new EC2 instances you are > >> unfortunately unable to do a fair apples to apples comparison. Have you > >> tried a different set of instances? > >> > >> Otis > >> -- > >> Performance Monitoring - http://sematex

Re: Incremental Update of index

2012-12-05 Thread Sandeep Mestry
Hi Amit/Shanu, You can create the solr document for only the updated record and index it to ensure only the updated record gets indexed. You need not rebuild indexes from scratch for every record update. Thanks, Sandeep

Re: Solr 4 : Optimize very slow

2012-12-06 Thread Sandeep Mestry
Hi All, I followed the advice Michael and the timings reduced to couple of hours now from 6-8 hours :-) I have attached the solrconfig.xml we're using, can you let me know if I'm missing something.. Thanks, Sandeep LUCENE_40 ${solr.abortOnConfigurationError:true}

Re: ConcurrentModificationException in Solr 3.6.1

2013-01-18 Thread Sandeep Mestry
Hi There, I think Andre has already guided you in your earlier mail.. This should be fixed in 3.6.2 which is available since Dec 25. >From the r

Possible issue in edismax?

2013-01-30 Thread Sandeep Mestry
Hi All, I'm facing an issue in relevancy calculation by dismax query parser. The boost factor applied does not work as expected in certain cases when the keyword is generic and by generic I mean, if the keyword is appearing many times in the document as well as in the index. I have parser configu

Re: Possible issue in edismax?

2013-01-30 Thread Sandeep Mestry
t; > On Wed, Jan 30, 2013 at 1:13 PM, Sandeep Mestry > wrote: > > > Hi All, > > > > I'm facing an issue in relevancy calculation by dismax query parser. > > The boost factor applied does not work as expected in certain cases when > > the keyword is generic and

Re: Possible issue in edismax?

2013-01-30 Thread Sandeep Mestry
in my previous mail, and I have also posted the parsed queries. From the debug query, I see that field boosted with lesser factor (contribution) is still resulting higher than the one with higher boost factor (series_title). Thanks, Sandeep On 30 January 2013 16:02, Sandeep Mestry wrote

Re: Possible issue in edismax?

2013-01-30 Thread Sandeep Mestry
, you are interested in get rid of IDF. So > for that, you can create a NoIDFSimilarity class to override the default > similarity. > > Can you paste here the score calculation for one document? > > > On Wed, Jan 30, 2013 at 2:06 PM, Sandeep Mestry wrote: > >> (Sorry

Re: Possible issue in edismax?

2013-01-30 Thread Sandeep Mestry
n^15 contribution) you > have to override the method of DefaultSimilarity. > > > On Wed, Jan 30, 2013 at 4:12 PM, Sandeep Mestry > wrote: > > > I have pasted it below and it is slightly variant from the dismax > > configuration I have mentioned above as I was

Re: Possible issue in edismax?

2013-01-31 Thread Sandeep Mestry
arity; > > public class NoIDFSimilarity extends DefaultSimilarity { > > @Override > > public float idf(long docFreq, long numDocs) { > > return 1; > > } > > } > > > It will "neutralize" the idf (which is the rarity of term

Re: Possible issue in edismax?

2013-02-01 Thread Sandeep Mestry
ll "neutralize" the idf (which is the rarity of term). > > > > > > > On Thu, Jan 31, 2013 at 5:31 AM, Sandeep Mestry > wrote: > > > Thanks Felipe.. > > Can you point me an example please? > > > > Also forgive me but if a document has matc

Re: Possible issue in edismax?

2013-02-01 Thread Sandeep Mestry
Brilliant! Thanks very much for your response. . On 1 Feb 2013 20:37, "Felipe Lahti" wrote: > It's not necessary. It's only query time. > > > On Fri, Feb 1, 2013 at 5:00 PM, Sandeep Mestry > wrote: > > > Hi.. > > > > Could you tell me

Re: Possible issue in edismax?

2013-02-12 Thread Sandeep Mestry
Mestry wrote: > Brilliant! Thanks very much for your response. . > On 1 Feb 2013 20:37, "Felipe Lahti" wrote: > >> It's not necessary. It's only query time. >> >> >> On Fri, Feb 1, 2013 at 5:00 PM, Sandeep Mestry >> wrote: >> >

Re: How to give more more importance to a document if term match is more

2013-02-19 Thread Sandeep Mestry
Hi Pragyanshis, I faced a similar problem few days ago and I was advised on this forum to override Solr DefaultSimilairy calculation to return always a constant value for idf. I think, in your case you'd also want to suppress the length norm which will require re-indexing as length norm is calcula

Re: Problem when I search something that contains a forward slash?

2013-02-19 Thread Sandeep Mestry
Hi Bruno, [image: ] Solr 4.0 added regular expression support, which means that '/' is now a special character and must be escaped if searching for literal forward slash. http://wiki.apache.org/solr/SolrQuerySyntax So, you can either escape it or use quotes like "A01H2/001" Cheers, Sandeep O

Re: Problem when I search something that contains a forward slash?

2013-02-19 Thread Sandeep Mestry
;> >> And using the " " is not the solution because Solr 3.6 has an issue when >> I use troncation like * inside the request: >> "A01H2/0*" doesn't work. >> >> Do you have an other solution for Solr 3.6 ? >> >> thanks a lot, >>

Forming Solr Query for multiple operators against multiple fields

2012-10-23 Thread Sandeep Mestry
Dear All, I have a requirement to search against multiple fields like title, description, annotations, comments, text and the query can contain multiple boolean operators. So, can someone point me out in right direction. If the user enters a query like , - (day AND world) NOT night I want to fo

Re: Forming Solr Query for multiple operators against multiple fields

2012-10-23 Thread Sandeep Mestry
Thanks Ahmet, however as I have mentioned in my e-mail, we're using Solr 1.4 here and edismax is supported from Solr 3.1. :-) On 23 October 2012 13:42, Ahmet Arslan wrote: > > > --- On Tue, 10/23/12, Sandeep Mestry wrote: > > > From: Sandeep Mestry > > Su