Re: svn commit: r899979 - /lucene/solr/trunk/example/solr/conf/solrconfig.xml

2010-01-18 Thread Yonik Seeley
On Mon, Jan 18, 2010 at 1:17 AM, Chris Hostetter
hossman_luc...@fucit.org wrote:
 : Right... for stock Solr usage (i.e. as long as they don't try to lock
 : the same thing.)
 : It is funny that native locks always work across different processes,
 : but not always in the same JVM though.

 Actaully, the more i think about this the less i understand it ... why
 don't native locks work within the same VM? ... and by work i mean why
 didn't he just get a lock timeout error?

Within the same VM, you need the same FileChannel for some reason.
Lucene uses a static hashmap so that multiple NativeFSLockFactory
instances will end up using the same FileChannel for locking.  But
multiple webapps obviously breaks that.

-Yonik
http://www.lucidimagination.com


Re: svn commit: r899979 - /lucene/solr/trunk/example/solr/conf/solrconfig.xml

2010-01-18 Thread Mark Miller
Yonik Seeley wrote:
 On Mon, Jan 18, 2010 at 1:17 AM, Chris Hostetter
 hossman_luc...@fucit.org wrote:
   
 : Right... for stock Solr usage (i.e. as long as they don't try to lock
 : the same thing.)
 : It is funny that native locks always work across different processes,
 : but not always in the same JVM though.

 Actaully, the more i think about this the less i understand it ... why
 don't native locks work within the same VM? ... and by work i mean why
 didn't he just get a lock timeout error?
 

 Within the same VM, you need the same FileChannel for some reason.
 Lucene uses a static hashmap so that multiple NativeFSLockFactory
 instances will end up using the same FileChannel for locking.  But
 multiple webapps obviously breaks that.

 -Yonik
 http://www.lucidimagination.com
   
Native Locks are obtained at the JVM level - so if you try and lock the
same Channel twice, since the same JVM already has the lock, its granted
again. I don't think it matters if its the same FileChannel or not - you
just can't use Native Locks within the same JVM, as the lock is held by
the JVM - they are per process - so Lucene does its own little static
map stuff to lock within JVM (simple in memory lock tracking) and uses
the actual Native Lock for multiple JVMs (which is all its good for -
process granularity). But obviously, the in memory locking doesn't work
across webapps.

-- 
- Mark

http://www.lucidimagination.com





Re: svn commit: r899979 - /lucene/solr/trunk/example/solr/conf/solrconfig.xml

2010-01-18 Thread Mark Miller
Mark Miller wrote:
 Yonik Seeley wrote:
   
 On Mon, Jan 18, 2010 at 1:17 AM, Chris Hostetter
 hossman_luc...@fucit.org wrote:
   
 
 : Right... for stock Solr usage (i.e. as long as they don't try to lock
 : the same thing.)
 : It is funny that native locks always work across different processes,
 : but not always in the same JVM though.

 Actaully, the more i think about this the less i understand it ... why
 don't native locks work within the same VM? ... and by work i mean why
 didn't he just get a lock timeout error?
 
   
 Within the same VM, you need the same FileChannel for some reason.
 Lucene uses a static hashmap so that multiple NativeFSLockFactory
 instances will end up using the same FileChannel for locking.  But
 multiple webapps obviously breaks that.

 -Yonik
 http://www.lucidimagination.com
   
 
 Native Locks are obtained at the JVM level - so if you try and lock the
 same Channel twice, since the same JVM already has the lock, its granted
 again. I don't think it matters if its the same FileChannel or not - you
 just can't use Native Locks within the same JVM, as the lock is held by
 the JVM - they are per process - so Lucene does its own little static
 map stuff to lock within JVM (simple in memory lock tracking) and uses
 the actual Native Lock for multiple JVMs (which is all its good for -
 process granularity). But obviously, the in memory locking doesn't work
 across webapps.

   
Also, the javadocs in Lucene are wrong:

  /*
   * The javadocs for FileChannel state that you should have
   * a single instance of a FileChannel (per JVM) for all
   * locking against a given file.  To ensure this, we have
   * a single (static) HashSet that contains the file paths
   * of all currently locked locks.  This protects against
   * possible cases where different Directory instances in
   * one JVM (each with their own NativeFSLockFactory
   * instance) have set the same lock dir and lock prefix.
   */

The javadocs for FileChannel don't say this at all - and this implies
that Lucene is doing something that it is not. The javadocs say don't
expect native locks to work for locking within a JVM, because it
doesn't. And Lucene doesn't try and use the same FileChannel per JVM (it
wouldn't help anyway) - Lucene simply attempts to track per JVM locks in
a static map (which doesn't work per JVM when you are dealing with
different classloaders).

-- 
- Mark

http://www.lucidimagination.com





Re: svn commit: r899979 - /lucene/solr/trunk/example/solr/conf/solrconfig.xml

2010-01-18 Thread Yonik Seeley
Ah thanks - I was going by that comment :-)

On Mon, Jan 18, 2010 at 12:07 PM, Mark Miller markrmil...@gmail.com wrote:
 Mark Miller wrote:
 Yonik Seeley wrote:

 On Mon, Jan 18, 2010 at 1:17 AM, Chris Hostetter
 hossman_luc...@fucit.org wrote:


 : Right... for stock Solr usage (i.e. as long as they don't try to lock
 : the same thing.)
 : It is funny that native locks always work across different processes,
 : but not always in the same JVM though.

 Actaully, the more i think about this the less i understand it ... why
 don't native locks work within the same VM? ... and by work i mean why
 didn't he just get a lock timeout error?


 Within the same VM, you need the same FileChannel for some reason.
 Lucene uses a static hashmap so that multiple NativeFSLockFactory
 instances will end up using the same FileChannel for locking.  But
 multiple webapps obviously breaks that.

 -Yonik
 http://www.lucidimagination.com


 Native Locks are obtained at the JVM level - so if you try and lock the
 same Channel twice, since the same JVM already has the lock, its granted
 again. I don't think it matters if its the same FileChannel or not - you
 just can't use Native Locks within the same JVM, as the lock is held by
 the JVM - they are per process - so Lucene does its own little static
 map stuff to lock within JVM (simple in memory lock tracking) and uses
 the actual Native Lock for multiple JVMs (which is all its good for -
 process granularity). But obviously, the in memory locking doesn't work
 across webapps.


 Also, the javadocs in Lucene are wrong:

  /*
   * The javadocs for FileChannel state that you should have
   * a single instance of a FileChannel (per JVM) for all
   * locking against a given file.  To ensure this, we have
   * a single (static) HashSet that contains the file paths
   * of all currently locked locks.  This protects against
   * possible cases where different Directory instances in
   * one JVM (each with their own NativeFSLockFactory
   * instance) have set the same lock dir and lock prefix.
   */

 The javadocs for FileChannel don't say this at all - and this implies
 that Lucene is doing something that it is not. The javadocs say don't
 expect native locks to work for locking within a JVM, because it
 doesn't. And Lucene doesn't try and use the same FileChannel per JVM (it
 wouldn't help anyway) - Lucene simply attempts to track per JVM locks in
 a static map (which doesn't work per JVM when you are dealing with
 different classloaders).

 --
 - Mark

 http://www.lucidimagination.com






[jira] Created: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Uri Boness (JIRA)
Script based UpdateRequestProcessorFactory
--

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness


A script based UpdateRequestProcessorFactory (Uses JDK6 script engine support). 
The main goal of this plugin is to be able to configure/write update processors 
without the need to write and package Java code.

The update request processor factory enables writing update processors in 
scripts located in {{solr.solr.home}} directory. The functory accepts one 
(mandatory) configuration parameter named {{scripts}} which accepts a 
comma-separated list of file names. It will look for these files under the 
{{conf}} directory in solr home. When multiple scripts are defined, their 
execution order is defined by the lexicographical order of the script file name 
(so {{scriptA.js}} will be executed before {{scriptB.js}}).

The script language is resolved based on the script file extension (that is, a 
*.js files will be treated as a JavaScript script), therefore an extension is 
mandatory.

Each script file is expected to have one or more methods with the same 
signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
*not* required to define all methods, only those hat are required by the 
processing logic.

The following variables are define as global variables for each script:
 * {{req}} - The SolrQueryRequest
 * {{rsp}}- The SolrQueryResponse
 * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Uri Boness (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Uri Boness updated SOLR-1725:
-

Attachment: SOLR-1725.patch

Initial implementation. Includes a simple test (probably more tests are 
required). Builds a script engine per script file - each file has its own scope.

This patch also introduces a new Interface - {{SolrResourceLoaderAware}} which 
can be used by any plugin loaded by SolrCore. (Any plugin implementing this 
interface will be injected by the resource loader of the SolrCore). The 
ScriptUpdateRequestProcessorFactory uses the resource loader to load the 
scripts from solr home conf directory.

 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Mark Miller (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12801971#action_12801971
 ] 

Mark Miller commented on SOLR-1725:
---

This is a great idea.

bq. This patch also introduces a new Interface - SolrResourceLoaderAware

What about the existing ResourceLoaderAware?


 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Uri Boness (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12801983#action_12801983
 ] 

Uri Boness commented on SOLR-1725:
--

bq. What about the existing ResourceLoaderAware?

Woops... missed that one out :-)... I'll check it out and update the patch

 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-236) Field collapsing

2010-01-18 Thread Michael Gundlach (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12801987#action_12801987
 ] 

Michael Gundlach commented on SOLR-236:
---

I've found the need to collapse on an analyzed field which contains one token 
(an email field, which is analyzed in order to lowercase it.)  I had to apply a 
patch on top of field-collapse-5.patch in order to comment out the 
isTokenized() check in AbstractCollapseComponent.java , at which point the code 
worked perfectly.

Is there a strong argument for keeping the isTokenized() check in?  Anyone who 
needs to collapse an analyzed, single-token field is out of luck with this 
check in place.  I understand that the current version protects users from 
incorrect results if they collapse a multi-token tokenized field, but maybe 
collapsing on analyzed fields is worth that risk.  (Or someone could come after 
me and write a patch that checks for multi-tokened fields somehow and throws an 
exception.)

 Field collapsing
 

 Key: SOLR-236
 URL: https://issues.apache.org/jira/browse/SOLR-236
 Project: Solr
  Issue Type: New Feature
  Components: search
Affects Versions: 1.3
Reporter: Emmanuel Keller
Assignee: Shalin Shekhar Mangar
 Fix For: 1.5

 Attachments: collapsing-patch-to-1.3.0-dieter.patch, 
 collapsing-patch-to-1.3.0-ivan.patch, collapsing-patch-to-1.3.0-ivan_2.patch, 
 collapsing-patch-to-1.3.0-ivan_3.patch, field-collapse-3.patch, 
 field-collapse-4-with-solrj.patch, field-collapse-5.patch, 
 field-collapse-5.patch, field-collapse-5.patch, field-collapse-5.patch, 
 field-collapse-5.patch, field-collapse-5.patch, field-collapse-5.patch, 
 field-collapse-5.patch, field-collapse-5.patch, field-collapse-5.patch, 
 field-collapse-5.patch, field-collapse-5.patch, field-collapse-5.patch, 
 field-collapse-5.patch, field-collapse-5.patch, 
 field-collapse-solr-236-2.patch, field-collapse-solr-236.patch, 
 field-collapsing-extended-592129.patch, field_collapsing_1.1.0.patch, 
 field_collapsing_1.3.patch, field_collapsing_dsteigerwald.diff, 
 field_collapsing_dsteigerwald.diff, field_collapsing_dsteigerwald.diff, 
 quasidistributed.additional.patch, SOLR-236-FieldCollapsing.patch, 
 SOLR-236-FieldCollapsing.patch, SOLR-236-FieldCollapsing.patch, 
 SOLR-236.patch, SOLR-236.patch, SOLR-236.patch, SOLR-236.patch, 
 SOLR-236.patch, solr-236.patch, SOLR-236_collapsing.patch, 
 SOLR-236_collapsing.patch


 This patch include a new feature called Field collapsing.
 Used in order to collapse a group of results with similar value for a given 
 field to a single entry in the result set. Site collapsing is a special case 
 of this, where all results for a given web site is collapsed into one or two 
 entries in the result set, typically with an associated more documents from 
 this site link. See also Duplicate detection.
 http://www.fastsearch.com/glossary.aspx?m=48amid=299
 The implementation add 3 new query parameters (SolrParams):
 collapse.field to choose the field used to group results
 collapse.type normal (default value) or adjacent
 collapse.max to select how many continuous results are allowed before 
 collapsing
 TODO (in progress):
 - More documentation (on source code)
 - Test cases
 Two patches:
 - field_collapsing.patch for current development version
 - field_collapsing_1.1.0.patch for Solr-1.1.0
 P.S.: Feedback and misspelling correction are welcome ;-)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Uri Boness (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12801988#action_12801988
 ] 

Uri Boness commented on SOLR-1725:
--

Is there any reason for currently limiting the classes that can be 
ResourceLoaderAware? This limitation is explicit in SolrResourceLoader (line: 
584):

{code}
awareCompatibility.put(
  ResourceLoaderAware.class, new Class[] {
CharFilterFactory.class,
TokenFilterFactory.class,
TokenizerFactory.class,
FieldType.class
  }
);
{code}

If the type is not one of this classes an exception is thrown

 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Mark Miller (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12801991#action_12801991
 ] 

Mark Miller commented on SOLR-1725:
---

I believe its somewhat arbitrary based on what makes sense - so adding 
something to it shouldn't be a problem.

 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Uri Boness (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12801994#action_12801994
 ] 

Uri Boness commented on SOLR-1725:
--

Right... ok... I'll add another class to this list (I just don't understand why 
would you want to limit the types that can be *Aware)

 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Issue Comment Edited: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Uri Boness (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12801994#action_12801994
 ] 

Uri Boness edited comment on SOLR-1725 at 1/18/10 11:52 PM:


Right... ok... I'll add another class to this list (I just don't understand why 
would you want to limit the types that can be *Aware - in a way it defeats the 
whole idea of the *Aware abstraction).

  was (Author: uboness):
Right... ok... I'll add another class to this list (I just don't understand 
why would you want to limit the types that can be *Aware)
  
 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Uri Boness (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Uri Boness updated SOLR-1725:
-

Attachment: SOLR-1725.patch

A new patch, this time leverages the already existing ResourceLoaderAware 
interface

 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch, SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Issue Comment Edited: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Mark Miller (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12801998#action_12801998
 ] 

Mark Miller edited comment on SOLR-1725 at 1/19/10 12:09 AM:
-

I believe the history was, on development of *aware - hey, here is a patch that 
restricts this to certain classes if we want? Anyone object? - and no one did.

*edit*

Actually there was some further discussion - 

https://issues.apache.org/jira/browse/SOLR-414

  was (Author: markrmil...@gmail.com):
I believe the history was, on development of *aware - hey, here is a patch 
that restricts this to certain classes if we want? Anyone object? - and no one 
did.
  
 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch, SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Uri Boness (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802001#action_12802001
 ] 

Uri Boness commented on SOLR-1725:
--

Thanks for the reference

 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch, SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1677) Add support for o.a.lucene.util.Version for BaseTokenizerFactory and BaseTokenFilterFactory

2010-01-18 Thread Mark Miller (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802020#action_12802020
 ] 

Mark Miller commented on SOLR-1677:
---

In my opinion this should be real simple. Having to specify a Lucene version 
for each component is not simple - its beyond most users. I think its beyond me 
(laugh as you see fit). Having to accept Lucene 2.4 behavior by default because 
of Solr back compat issues is also weak. A new user should get all the bug 
fixes of the latest Lucene with minimal effort. Hopefully no effort. Older 
users should be able to get the newest with minimal effort as well - not having 
to go one by one through each component and upgrading it. I can't imagine 
juggling all these versions for each component - thats ugly enough in Lucene - 
it shouldn't infect Solr for the average case.

Personally, I do think there should be a global default. And I think right next 
to it, it should say, if you change this, you must reindex. No worries about 
action at a distance. The action is to get the latest and greatest Lucene has 
to offer rather than older buggy or back compat behavior. Reindex, get latest 
greatest. Don't reindex and your on your own. Solr might rip your head off.

We should also offer per component for real experts, but I wouldn't be meddling 
that way myself unless in a bind. Solr should be real simple about this - and 
the latest Solr should use the latest bug fixes from Lucene, with previous 
configs out there defaulting to 2.4 compatibility.

I abbreviated the heck out of my arguments and thinking, but damn it thats what 
I think :)

 Add support for o.a.lucene.util.Version for BaseTokenizerFactory and 
 BaseTokenFilterFactory
 ---

 Key: SOLR-1677
 URL: https://issues.apache.org/jira/browse/SOLR-1677
 Project: Solr
  Issue Type: Sub-task
  Components: Schema and Analysis
Reporter: Uwe Schindler
 Attachments: SOLR-1677.patch, SOLR-1677.patch, SOLR-1677.patch, 
 SOLR-1677.patch


 Since Lucene 2.9, a lot of analyzers use a Version constant to keep backwards 
 compatibility with old indexes created using older versions of Lucene. The 
 most important example is StandardTokenizer, which changed its behaviour with 
 posIncr and incorrect host token types in 2.4 and also in 2.9.
 In Lucene 3.0 this matchVersion ctor parameter is mandatory and in 3.1, with 
 much more Unicode support, almost every Tokenizer/TokenFilter needs this 
 Version parameter. In 2.9, the deprecated old ctors without Version take 
 LUCENE_24 as default to mimic the old behaviour, e.g. in StandardTokenizer.
 This patch adds basic support for the Lucene Version property to the base 
 factories. Subclasses then can use the luceneMatchVersion decoded enum (in 
 3.0) / Parameter (in 2.9) for constructing Tokenstreams. The code currently 
 contains a helper map to decode the version strings, but in 3.0 is can be 
 replaced by Version.valueOf(String), as the Version is a subclass of Java5 
 enums. The default value is Version.LUCENE_24 (as this is the default for the 
 no-version ctors in Lucene).
 This patch also removes unneeded conversions to CharArraySet from 
 StopFilterFactory (now done by Lucene since 2.9). The generics are also fixed 
 to match Lucene 3.0.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Uri Boness (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802022#action_12802022
 ] 

Uri Boness commented on SOLR-1725:
--

Yes, it depends on Java 6. I guess the concern is mainly for the unit tests? 
(at runtime the it shouldn't really matter)


 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch, SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Uri Boness (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802024#action_12802024
 ] 

Uri Boness commented on SOLR-1725:
--

Sorry... of course it matters for the build :-)

 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch, SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Uri Boness (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Uri Boness updated SOLR-1725:
-

Attachment: SOLR-1725.patch

Third try :-), this time Java 5 compatible

 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch, SOLR-1725.patch, SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SOLR-1725) Script based UpdateRequestProcessorFactory

2010-01-18 Thread Noble Paul (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-1725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802100#action_12802100
 ] 

Noble Paul commented on SOLR-1725:
--


Why are we limiting this to javascript . Why can't somebody use 
groovy/Scala/JRuby or whatever is supported by the the java6 scripting engine?



 Script based UpdateRequestProcessorFactory
 --

 Key: SOLR-1725
 URL: https://issues.apache.org/jira/browse/SOLR-1725
 Project: Solr
  Issue Type: New Feature
  Components: update
Affects Versions: 1.4
Reporter: Uri Boness
 Attachments: SOLR-1725.patch, SOLR-1725.patch, SOLR-1725.patch


 A script based UpdateRequestProcessorFactory (Uses JDK6 script engine 
 support). The main goal of this plugin is to be able to configure/write 
 update processors without the need to write and package Java code.
 The update request processor factory enables writing update processors in 
 scripts located in {{solr.solr.home}} directory. The functory accepts one 
 (mandatory) configuration parameter named {{scripts}} which accepts a 
 comma-separated list of file names. It will look for these files under the 
 {{conf}} directory in solr home. When multiple scripts are defined, their 
 execution order is defined by the lexicographical order of the script file 
 name (so {{scriptA.js}} will be executed before {{scriptB.js}}).
 The script language is resolved based on the script file extension (that is, 
 a *.js files will be treated as a JavaScript script), therefore an extension 
 is mandatory.
 Each script file is expected to have one or more methods with the same 
 signature as the methods in the {{UpdateRequestProcessor}} interface. It is 
 *not* required to define all methods, only those hat are required by the 
 processing logic.
 The following variables are define as global variables for each script:
  * {{req}} - The SolrQueryRequest
  * {{rsp}}- The SolrQueryResponse
  * {{logger}} - A logger that can be used for logging purposes in the script

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (SOLR-1717) SolrHighlighter#fragmenter, formatter etc do not need synchronization

2010-01-18 Thread Noble Paul (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Noble Paul resolved SOLR-1717.
--

Resolution: Fixed

committed Revision: 900680

 SolrHighlighter#fragmenter, formatter etc do not need synchronization
 -

 Key: SOLR-1717
 URL: https://issues.apache.org/jira/browse/SOLR-1717
 Project: Solr
  Issue Type: Improvement
  Components: highlighter
Affects Versions: 1.4
Reporter: Noble Paul
Assignee: Noble Paul
Priority: Trivial
 Fix For: 1.5

 Attachments: SOLR-1717.patch


 These fields are created one time only and never modified. No synchronization 
 is required

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.