Re: Synonym not working in 4.10 / CDH 5.14

2018-03-01 Thread Alessandro Hoss
How's your synonyms declared in the file?

That xml comment () in the synonym filter section isn't there in
your running solr schema.xml, right? :)

On Thu, Mar 1, 2018 at 2:53 PM Abhi Basu <9000r...@gmail.com> wrote:

> Yes have tested with PA and NY, nothing works.
>
> On Thu, Mar 1, 2018 at 11:38 AM, Alessandro Hoss <aleh...@gmail.com>
> wrote:
>
> > Have you tested with another state?
> >
> > I'm asking because maybe solr is considering "OR" as a clause separator
> > instead of a search term, and in this case the problem is not with
> synonym,
> > it is with your query.
> >
> > On Thu, Mar 1, 2018 at 2:24 PM Abhi Basu <9000r...@gmail.com> wrote:
> >
> > >  Can someone please help me?
> > >
> > > Schema.xml
> > >
> > >  > > stored="true" docValues="true"/>
> > >
> > >  > > multiValued="true"/>
> > >
> > >
> > > 
> > >
> > >
> > >  > > positionIncrementGap="100">
> > >   
> > > 
> > >  > > words="stopwords.txt" />
> > >  > > ignoreCase="true" expand="true"
> > > tokenizerFactory="solr.StandardTokenizerFactory"/>
> > > 
> > >   
> > >   
> > > 
> > >  > > words="stopwords.txt" />
> > > 
> > > 
> > >   
> > > 
> > >
> > >
> > >
> > >
> > > Synonyms.txt has been populated with State abbreviations and names.
> > >
> > >
> > > When searching for
> > >
> > > PropertyAddressState:"Oregon", I do not find docs with "OR".
> > >
> > >
> > >
> > > What am I missing?
> > >
> > >
> > > Thanks,
> > >
> > > Abhi
> > >
> >
>
>
>
> --
> Abhi Basu
>


Re: Synonym not working in 4.10 / CDH 5.14

2018-03-01 Thread Alessandro Hoss
Have you tested with another state?

I'm asking because maybe solr is considering "OR" as a clause separator
instead of a search term, and in this case the problem is not with synonym,
it is with your query.

On Thu, Mar 1, 2018 at 2:24 PM Abhi Basu <9000r...@gmail.com> wrote:

>  Can someone please help me?
>
> Schema.xml
>
>  stored="true" docValues="true"/>
>
>  multiValued="true"/>
>
>
> 
>
>
>  positionIncrementGap="100">
>   
> 
>  words="stopwords.txt" />
>  ignoreCase="true" expand="true"
> tokenizerFactory="solr.StandardTokenizerFactory"/>
> 
>   
>   
> 
>  words="stopwords.txt" />
> 
> 
>   
> 
>
>
>
>
> Synonyms.txt has been populated with State abbreviations and names.
>
>
> When searching for
>
> PropertyAddressState:"Oregon", I do not find docs with "OR".
>
>
>
> What am I missing?
>
>
> Thanks,
>
> Abhi
>


Re: Solr - Managed Resources REST API to get stopwords

2018-02-14 Thread Alessandro Hoss
So are you saying this REST api can't give me access to stopwords defined in
this file?

Is there a query which will give me stopwords defined in
server\solr\collection\conf\lang\stopwords_en.txt  file ?

No, the managed resources are managed via API, and stored in a "
schema_analysis_stopwords_english.json" file inside the core directory.

Maybe you can convert your .txt file to the new json file format and change
the file name accordingly for a warm start.

Regards,
Alessandro Hoss

On Wed, Feb 14, 2018 at 10:57 AM ruby <rshoss...@gmail.com> wrote:

> I was hoping to get back the list of stopwords which are defined in
> server\solr\collection\conf\lang\stopwords_en.txt  file.
>
> So are you saying this REST api can't give me access to stopwords defined
> in
> this file?
>
> Is there a query which will give me stopwords defined in
> server\solr\collection\conf\lang\stopwords_en.txt  file ?
>
> Thanks
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>


Re: Using _default configset in standalone mode

2018-01-02 Thread Alessandro Hoss
Thanks Shawn,


> How are you doing the core create?
>
You're right, I was using CoreAdmin API.

If you use "bin/solr create"

Actually I haven't tried the bin/solr script because I do everything
remotely on Solr.
Thanks for the tip, it worked the way I want (copying the conf to a new
folder), but I need to do it through an API and choosing what configset to
copy from.

That is exactly what the configset feature is designed to do.  It
> emulates the behavior of SolrCloud in  standalone mode, where the
> instanceDir does not have a conf directory.  A central config directory
> is used.
>
That's exactly what I need. I've tried the Collections API, but it doesn't
work when running on standalone mode (Doesn't it make sense to work and
emulates the behavior of SolrCloud in standalone mode?).

> I need something like creating configset with baseConfigSet
> <https://lucene.apache.org/solr/guide/6_6/configsets-api.html#ConfigSetsAPI-create>,
> but in standalone mode.
>
Is there any API for doing this?

Thanks in advance.


On Tue, Jan 2, 2018 at 4:48 PM Shawn Heisey <apa...@elyograg.org> wrote:

> On 12/27/2017 7:06 AM, Alessandro Hoss wrote:
> > After reading this
> > <
> https://lucene.apache.org/solr/guide/7_0/major-changes-in-solr-7.html#new-default-configset
> >
> > docs,
> > I'm trying to achieve the following with version 7.2.0:

>
> >-
> >When creating a new collection, if you *do not specify a configSet*,
> the
> >_default will be used.
> >-
> >
> >   *If you use standalone mode, the instanceDir will be created
> >   automatically, using the _defaultconfigSet as it’s basis.*
> >
> > But if I try to create a *core* in standalone mode without specifying a
> > configset, it searches for config files and throw this:
>
> How are you doing the core create?
>

> If you're using the CoreAdmin API (either through the admin UI or using
> HTTP calls directly), then you cannot do it.  CoreAdmin is *ancient* and
> is just a way to add an existing core directory to Solr.  It has never
> copied configs, and if I had to guess, likely never will, unless a lot
> of users demand it.
>
> If you use "bin/solr create" or "bin\solr create" (depending on OS),

then your expected behavior should be what you get in version 7 -- it
> should create a new core directory, copy the _default configset to a
> conf directory inside it, and then use an HTTP call to add the new core
> to Solr.
>
> > And if I specify the configSet parameter, it uses the configset folder
> > instead of copying the conf folder to the new instanceDir.
>
> That is exactly what the configset feature is designed to do.  It
> emulates the behavior of SolrCloud in  standalone mode, where the
> instanceDir does not have a conf directory.  A central config directory
> is used.


> Shawn
>
>


Re: delete solr data and index older than 3 days

2017-12-28 Thread Alessandro Hoss
My bad... my answer is wrong. It's deleting only the data from the last
three days, which is the opposite that you want..

Please check Erick's answer.

Sorry.

On Thu, Dec 28, 2017 at 6:39 PM Alessandro Hoss <aleh...@gmail.com> wrote:

> Hello,
>
> You can use the same behavior as the delete all
> <https://wiki.apache.org/solr/FAQ#How_can_I_delete_all_documents_from_my_index.3F>,
> but instead of querying for "*:*", you should query for something like
> "yourdatefield:[NOW-3DAYS TO NOW]"
>
> If you need to round to the start of the third day before today and the
> end of today you can use "[NOW/DAY-3DAYS TO NOW/DAY+1DAY-1SECOND]"
>
> See also working with dates
> <https://lucene.apache.org/solr/guide/7_2/working-with-dates.html>
>
> --
> Alessandro Hoss
>
> On Thu, Dec 28, 2017 at 5:02 PM ppeddi <phani.pe...@gmail.com> wrote:
>
>> hi,
>> Can anyone please post the syntax or some examples for deleting solr data
>> and index older than 3 days based on datetime field in solr collection.
>>
>> I have field data_Start_time which stores the date value in and is of type
>> 'date' in my solr collection. I want to delete the index/data older than 3
>> days and then optimize the collection.
>>
>> Please let me know the syntax.
>>
>> Thanks,
>> Ppeddi
>>
>>
>>
>>
>> --
>> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>>
>


Re: delete solr data and index older than 3 days

2017-12-28 Thread Alessandro Hoss
Hello,

You can use the same behavior as the delete all
<https://wiki.apache.org/solr/FAQ#How_can_I_delete_all_documents_from_my_index.3F>,
but instead of querying for "*:*", you should query for something like
"yourdatefield:[NOW-3DAYS TO NOW]"

If you need to round to the start of the third day before today and the end
of today you can use "[NOW/DAY-3DAYS TO NOW/DAY+1DAY-1SECOND]"

See also working with dates
<https://lucene.apache.org/solr/guide/7_2/working-with-dates.html>

--
Alessandro Hoss

On Thu, Dec 28, 2017 at 5:02 PM ppeddi <phani.pe...@gmail.com> wrote:

> hi,
> Can anyone please post the syntax or some examples for deleting solr data
> and index older than 3 days based on datetime field in solr collection.
>
> I have field data_Start_time which stores the date value in and is of type
> 'date' in my solr collection. I want to delete the index/data older than 3
> days and then optimize the collection.
>
> Please let me know the syntax.
>
> Thanks,
> Ppeddi
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>


Using _default configset in standalone mode

2017-12-27 Thread Alessandro Hoss
Hello,

After reading this

docs,
I'm trying to achieve the following with version 7.2.0:

   -

   When creating a new collection, if you *do not specify a configSet*, the
   _default will be used.
   -

  *If you use standalone mode, the instanceDir will be created
  automatically, using the _defaultconfigSet as it’s basis.*

But if I try to create a *core* in standalone mode without specifying a
configset, it searches for config files and throw this:

Error CREATEing SolrCore 'mycore1': Unable to create core [mycore1]
Caused by: Can't find resource 'solrconfig.xml' in classpath or
'/opt/solr-7.2.0/server/solr/mycore1'


And if I specify the configSet parameter, it uses the configset folder
instead of copying the conf folder to the new instanceDir.

Is that possible to create an instanceDir in standalone mode that *copies*
configurations from the _default configset?
I need something like creating configset with baseConfigSet
,
but in standalone mode.
What's the best approach for doing this?

Any help is appreciated.


Re: Upload/update full schema and solrconfig in standalone mode

2017-10-20 Thread Alessandro Hoss
Thanks for your comments Rick,

Sorry, but I didn't understand what you mean with "scp". But let me explain
our scenario:
Our application is on-premises, so I can't control the infrastructure of
the customer, they just tell me the Solr address and if Solr is running on
Cloud mode or not.

As our app is responsible for indexing and searching, we used to control
schema and solrconfig configurations by sending these files to the
customers, but this requires to trust in their Ops and often causes some
troubles because of misconfigurations.

I was looking for a way of doing this automatically from my app.

Thanks again,
Alessandro Hoss

On Fri, Oct 20, 2017 at 2:39 PM Rick Leir <rl...@leirtech.com> wrote:

> Alessandro
> First, let me say that the whole idea makes me nervous.
> 1/ are you better off with scp? I would not want to do this via Solr API
> 2/ the right way to do this is with Ansible, Puppet or Docker,
> 3/ would you like to update a 'QA' installation, test it, then flip it
> into production? Cheers -- Rick
>
> On October 20, 2017 8:49:14 AM EDT, Alessandro Hoss <aleh...@gmail.com>
> wrote:
> >Hello,
> >
> >Is it possible to upload the entire schema and solrconfig.xml to a Solr
> >running on standalone mode?
> >
> >I know about the Config API
> ><https://lucene.apache.org/solr/guide/6_6/config-api.html>, but it
> >allows
> >only add or modify solrconfig properties, and what I want is to change
> >the
> >whole config (schema and solrconfig) to ensure it's up to date.
> >
> >What I need is something similar to the Configsets API
> ><https://lucene.apache.org/solr/guide/6_6/configsets-api.html>, where
> >I'm
> >able to upload a zip containing both schema and solrconfig.xml, but
> >unfortunately it's SolrCloud only.
> >
> >Is there a way of doing that in standalone mode?
> >
> >Thanks in advance.
> >Alessandro Hoss
>
> --
> Sorry for being brief. Alternate email is rickleir at yahoo dot com


Upload/update full schema and solrconfig in standalone mode

2017-10-20 Thread Alessandro Hoss
Hello,

Is it possible to upload the entire schema and solrconfig.xml to a Solr
running on standalone mode?

I know about the Config API
<https://lucene.apache.org/solr/guide/6_6/config-api.html>, but it allows
only add or modify solrconfig properties, and what I want is to change the
whole config (schema and solrconfig) to ensure it's up to date.

What I need is something similar to the Configsets API
<https://lucene.apache.org/solr/guide/6_6/configsets-api.html>, where I'm
able to upload a zip containing both schema and solrconfig.xml, but
unfortunately it's SolrCloud only.

Is there a way of doing that in standalone mode?

Thanks in advance.
Alessandro Hoss


Solr LTS version

2017-09-29 Thread Alessandro Hoss
Hello,

I would like to know if there is a defined period of support for LTS
versions. If yes, how long is it?

Another question: The community page (
http://lucene.apache.org/solr/community.html) shows version 6.4.x as LTS.
Is this outdated? Shouldn't it be 6.6.x?

Thanks in advance,
Alessandro Hoss


Re: Latest stable SOLR version

2017-09-11 Thread Alessandro Hoss
Solr 6.6.1 was already released on September 7:

http://www.apache.org/dyn/closer.lua/lucene/solr/6.6.1
Release notes: https://lucene.apache.org/solr/6_6_1/changes/Changes.html

Guess you should give it a try.

On Mon, Sep 11, 2017 at 1:15 PM Gunalan V  wrote:

> Thank You!
>
> I believe 6.6 should have fixed all the previous version issues. But in 6.6
> is there any major issues noticed?  if so I will go with 6.5.1 else will
> proceed with 6.6.
>
> Kindly confirm!
>
>
>
> GVK
>
> On Mon, Sep 11, 2017 at 10:59 AM, Walter Underwood 
> wrote:
>
> > We have been running 6.5.1 in production since May. I would not run
> > anything before that.
> >
> > The new metrics code caused performance problems. That was fixed in
> 6.5.0.
> >
> > There was a memory leak talking to Zookeeper. That was fixed in 6.5.1.
> >
> > Solr 6.6.1 should be released very soon.
> >
> > wunder
> > Walter Underwood
> > wun...@wunderwood.org
> > http://observer.wunderwood.org/  (my blog)
> >
> >
> > > On Sep 11, 2017, at 8:36 AM, Gunalan V  wrote:
> > >
> > > Hello,
> > >
> > > In our project we are planning to use SOLR and I'm new to it. So, what
> is
> > > the latest stable version we can use and that is supported by Apache?
> > >
> > > Kindly let me know your suggestions because we started with installing
> > SOLR
> > > 6.2 but heard that there are many issues and need to be upgraded to 6.3
> > or
> > > so.
> > >
> > >
> > > Thanks,
> > > GVK
> >
> >
>


Managed Resources separated by core when using configset

2017-09-04 Thread Alessandro Hoss
Hello,

I've a situation where I need the same configuration (schema.xml and
solrconfig.xml) for all the cores in my solr instance, and I can manage
this with the same configset.
BUT, in my case the synonyms and stopwords should be managed by tenant/core
(each tenant is a solr core), and can be different for each one.

I was trying to use managed resources, but I guess it doesn't handle the
core when using configset.
Once I pass the core name in CRUD operations, it looks like a bug, because
it's not handling different resources, and if I don't reload the core right
before a PUT request, for example, the next PUT in other core will override
the previous and ignore them. Here's what I'm trying:

Create core1 using techproducts configset:
curl "
http://localhost:8983/solr/admin/cores?action=CREATE=core1=core1=sample_techproducts_configs
"

Create core2 using techproducts configset:
curl "
http://localhost:8983/solr/admin/cores?action=CREATE=core2=core2=sample_techproducts_configs
"

Check the current stopwords (they are the same at this point): --this
requests will be used again later
curl "http://localhost:8983/solr/core1/schema/analysis/stopwords/english;
curl "http://localhost:8983/solr/core2/schema/analysis/stopwords/english;

Add a stopword in core1:
curl -X PUT -H 'Content-type:application/json' --data-binary '["zz1"]' "
http://localhost:8983/solr/core1/schema/analysis/stopwords/english;

Check the current stopwords (now the core2 does NOT have the inserted
stopword - and shouldn't, because the request was specifically for core1)

ADD a stopword in core2:
curl -X PUT -H 'Content-type:application/json' --data-binary '["zz2"]' "
http://localhost:8983/solr/core2/schema/analysis/stopwords/english;

Check the current stopwords (now both cores have what I expected - "zz1" in
core1 and "zz2" in core2)

The problem is, now when I reload the core1, it will override the stopwords
with the last updated version, which means it'll lose the "zz1" word.
curl "http://localhost:8983/solr/admin/cores?action=RELOAD=core1;
curl "http://localhost:8983/solr/core1/schema/analysis/stopwords/english;

Did I make myself clear? :)
Can someone confirm if this is a bug or if I doing something wrong?

Thanks in advance,
Alessandro Hoss