Re: Calculating distances in Solr using longitude latitude

2010-09-22 Thread Thomas Joiner
Re: your problems with JIRA

I have no idea what caused it/what resolved it but I have had the same
problem as you.  Assuming, that is, that the problem that is occurring is
when you click on a link to an issue, it instead takes you to
https://issues.apache.org/jira/secure/Dashboard.jspa  Or perhaps the page
above it...I don't remember clearly any more.

If you click Browse Project then navigate to Solr, and type the issue
number in the quick search box, it should get you to the issue.  I'm sorry I
don't know a simpler way to do this/why it isn't working correctly, but
maybe in your case it will magically resolve itself like it did in my case.

(Sorry for the somewhat off-topic post, however since he did make a comment
about it on this thread, I felt it appropriate to respond on this thread as
well.)

On Wed, Sep 22, 2010 at 10:30 AM, Dennis Gearon gear...@sbcglobal.netwrote:

 Well, do the least expensive operations first, all the other filtering on
 keywords, dates, other fields, then the bounding box, then generate the
 distances.

 Really not sure what is local solr, but going to look now.
 Dennis Gearon

 Signature Warning
 
 EARTH has a Right To Life,
  otherwise we all die.

 Read 'Hot, Flat, and Crowded'
 Laugh at http://www.yert.com/film.php


 --- On Wed, 9/22/10, PeterKerk vettepa...@hotmail.com wrote:

  From: PeterKerk vettepa...@hotmail.com
  Subject: Re: Calculating distances in Solr using longitude latitude
  To: solr-user@lucene.apache.org
  Date: Wednesday, September 22, 2010, 1:41 AM
 
 
  Dennis Gearon wrote:
  
   Soo, the short term answer is to use a function
  column to query
   against? Prefereably with a bounding box, of course.
  :-)
  
 
  What do you mean by that? Calculate all locations within a
  certain range
  (bounding box) and query on that?
  I hope not, because that would be a very unfriendly
  solution.
 
  Im still surprised that this is not a bigger priority for
  the Solr
  developers.
 
  I think the better solution would then be to use LocalSolr,
  but I dont know:
  1. if their implementation offers the same functions as the
  current Solr
  release and
  2. if I was to use LocalSolr I woud simply use their
  implementation of Solr
  instead of Solr OR that I have to copy some classes to my
  current deployment
  of Solr
 
  pff :)
  --
  View this message in context:
 http://lucene.472066.n3.nabble.com/Calculating-distances-in-Solr-using-longitude-latitude-tp1524297p1559728.html
  Sent from the Solr - User mailing list archive at
  Nabble.com.
 



Re: Searching solr with a two word query

2010-09-21 Thread Thomas Joiner
I think what you want is a query like

all_text:(opening excellent) AND presentation_id:294 AND type:blob

which will require one of the all_text clauses to be true.

On Tue, Sep 21, 2010 at 12:20 PM, n...@frameweld.com wrote:

 Alright, this is making much more sense now, but there are still some
 problems. Removing the first AND in the query did solve a lot of things,
 beforehand I didn't know that it was requiring the word excel. Now I run the
 query as either of the two:

 opening excellent +presentation_id:294 +type:blob
 opening excellent presentation_id:294 AND type:blob

 I do get the results I want which have both words or either, BUT I get
 results that have neither. I think it may be grabbing results that belong to
 the specific presentation_id and if it's a blob type.

 What I want it to do is give me results that have both words, or one or the
 other.

 Thanks,
 - Noel

 -Original Message-
 From: Tom Hill solr-l...@worldware.com
 Sent: Monday, September 20, 2010 6:39pm
 To: solr-user@lucene.apache.org
 Subject: Re: Searching solr with a two word query

 It will probably be clearer if you don't use the pseudo-boolean
 operators, and just use + for required terms.

 If you look at your output from debug, you see your query becomes:

 all_text:open +all_text:excel +presentation_id:294 +type:blob

 Note that all_text:open does not have a + sign, but
 all_text:excel has one. So all_text:open is not required, but
 all_text:excel is.

 I think this is because AND marks both of its operands as required.
 (which puts the + on +all_text:excel), but the open has no explicit
 op, so it uses OR, which marks that term as optional.

 What I would suggest you do is:

opening excellent +presentation_id:294 +type:blob

 Which is think is much clearer.

 I think you could also do
   opening excellent presentation_id:294 AND type:blob
 but I think it's  non-obvious how the result will differ from
   opening excellent AND presentation_id:294 AND type:blob
 So I wouldn't use either of the last two.


 Tom
 p.s. Not sure what is going on with the last lines of your debug
 output for the query. Is that really what shows up after presentation
 ID? I see Euro, hash mark, zero, semi-colon, and H with stroke

 str name=parsedquery_toString
 all_text:open +all_text:excel +presentation_id:€#0;Ħ +type:blob
 /str

 On Mon, Sep 20, 2010 at 12:46 PM, n...@frameweld.com wrote:
 
  Say if I had a two word query that was opening excellent, I would like
 it to return something like:
 
  opening excellent
  opening
  opening
  opening
  excellent
  excellent
  excellent
 
  Instead of:
  opening excellent
  excellent
  excellent
  excellent
 
  If I did a search, I would like the first word alone to also show up in
 the results, because currently my results show both words in one result and
 only the second word for the rest of the results. I've done a search on each
 word by itself, and there are results for them.
 
  Thanks.
 
  -Original Message-
  From: Erick Erickson erickerick...@gmail.com
  Sent: Monday, September 20, 2010 2:37pm
  To: solr-user@lucene.apache.org
  Subject: Re: Searching solr with a two word query
 
  I'm missing what you really want out of your query, your
  phrase either word as a single result just isn't connecting
  in my grey matter.. Could you give some example inputs and
  outputs that demonstrates what you want?
 
  Best
  Erick
 
  On Mon, Sep 20, 2010 at 11:41 AM, n...@frameweld.com wrote:
 
   I noticed that my defaultOperator is OR, and that does have an effect
 on
   what does come up. If I were to change that to and, it's an exact match
 to
   my query, but Im would like similar matches with either word as a
 single
   result. Is there another value I can use? Or maybe I should use another
   query parser?
  
   Thanks.
   - Noel
  
   -Original Message-
   From: Erick Erickson erickerick...@gmail.com
   Sent: Monday, September 20, 2010 10:05am
   To: solr-user@lucene.apache.org
   Subject: Re: Searching solr with a two word query
  
   Here's an excellent description of the Lucene query operators and how
 they
   differ from strict
   boolean logic:
   http://www.gossamer-threads.com/lists/lucene/java-user/47928
  
   http://www.gossamer-threads.com/lists/lucene/java-user/47928But the
   short
   form is that (and boy, doesn't the fact that the URL escaping spaces
   as '+', which is also a Lucene operator make looking at these
 interesting),
   is that the
   first term is essentially a SHOULD clause in a Lucene BooleanQuery and
 is
   matching your docs all by itself.
  
   HTH
   Erick
  
   On Mon, Sep 20, 2010 at 8:58 AM, n...@frameweld.com wrote:
  
Here is my raw query:
   
  
 q=opening+excellent+AND+presentation_id%3A294+AND+type%3Ablobversion=1.3
json.nl
   
  
 =maprows=10start=0wt=xmlhl=truehl.fl=texthl.simple.pre=span+class%3Dhlhl.simple.post=%2Fspanhl.fragsize=0hl.mergeContiguous=falsedebugQuery=on
   
and here is what I get on the 

Re: Solr for statistical data

2010-09-20 Thread Thomas Joiner
I don't know if this thread might help with your problems any, but it might
give some pointers:

http://lucene.472066.n3.nabble.com/Tuning-Solr-caches-with-high-commit-rates-NRT-td1461275.html

http://lucene.472066.n3.nabble.com/Tuning-Solr-caches-with-high-commit-rates-NRT-td1461275.html
--Thomas

On Mon, Sep 20, 2010 at 7:58 AM, Kjetil Ødegaard
kjetil.odega...@gmail.comwrote:

 On Thu, Sep 16, 2010 at 11:48 AM, Peter Karich peat...@yahoo.de wrote:

  Hi Kjetil,
 
  is this custom component (which performes groub by + calcs stats)
  somewhere available?
  I would like to do something similar. Would you mind to share if it
  isn't already available?
 
  The grouping stuff sounds similar to
  https://issues.apache.org/jira/browse/SOLR-236
 
  where you can have mem problems too ;-) or see:
  https://issues.apache.org/jira/browse/SOLR-1682
 
 
 Thanks for the links! These patches seem to provide somewhat similar
 functionality, I'll investigate if they're implemented in a similar way
 too.

 We've developed this component for a client, so while I'd like to share it
 I
 can't make any promises. Sorry.


   Any tips or similar experiences?
 
  you want to decrease memory usage?


 Yes. Specifically, I would like to keep the heap at 4 GB. Unfortunately I'm
 still seeing some OutOfMemoryErrors so I might have to up the heap size
 again.

 I guess what I'm really wondering is if there's a way to keep memory use
 down, while at the same time not sacrificing the performance of our
 queries.
 The queries have to run through all values for a field in order to
 calculate
 the sum, so it's not enough to just cache a few values.

 The code which fetches values from the index uses
 FieldCache.DEFAULT.getStringIndex for a field, and then indexes like this:

 FieldType fieldType = searcher.getSchema().getFieldType(fieldName);

 fieldType.indexedToReadable(stringIndex.lookup[stringIndex.order[documentId]]);

 Is there a better way to do this? Thanks.


 ---Kjetil



Re: Search the mailinglist?

2010-09-17 Thread Thomas Joiner
Also there is http://lucene.472066.n3.nabble.com/Solr-User-f472068.html if
you prefer a forum format.

On Fri, Sep 17, 2010 at 9:15 AM, Markus Jelsma markus.jel...@buyways.nlwrote:

 http://www.lucidimagination.com/search/?q=


 On Friday 17 September 2010 16:10:23 alexander sulz wrote:
Im sry to bother you all with this, but is there a way to search
 through
  the mailinglist archive? Ive found
  http://mail-archives.apache.org/mod_mbox/lucene-solr-user/ so far
  but there isnt any convinient way to search through the archive.
 
  Thanks for your help
 

 Markus Jelsma - Technisch Architect - Buyways BV
 http://www.linkedin.com/in/markus17
 050-8536620 / 06-50258350




Re: Null Pointer Exception while indexing

2010-09-16 Thread Thomas Joiner
My guess would be that Jetty has some configuration somewhere that is
telling it to use GCJ.  Is it possible to completely remove GCJ from the
system?  Another possibility would be to uninstall Jetty, and then reinstall
it, and hope that on the reinstall it would pick up on the OpenJDK.

What distro of linux are you using?  It probably depends on that how to set
the JVM.

On Thu, Sep 16, 2010 at 10:22 AM, andrewdps mstpa...@gmail.com wrote:


 Lance,

 We are on Solr Specification Version: 1.4.1
 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1488320.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: SOLR interface with PHP using javabin?

2010-09-16 Thread Thomas Joiner
If you wish to interface to Solr from PHP, and decide to go with Yonik's
suggestion to use JSON, I would suggest using
http://code.google.com/p/solr-php-client/

It has served my needs for the most part.

On Thu, Sep 16, 2010 at 1:33 PM, Yonik Seeley yo...@lucidimagination.comwrote:

 On Thu, Sep 16, 2010 at 2:30 PM, onlinespend...@gmail.com
 onlinespend...@gmail.com wrote:
   I am planning on creating a website that has some SOLR search
 capabilities
  for the users, and was also planning on using PHP for the server-side
  scripting.
 
  My goal is to find the most efficient way to submit search queries from
 the
  website, interface with SOLR, and display the results back on the
 website.
   If I use PHP, it seems that all the solutions use some form of character
  based stream for the interface.  It would seem that using a binary
  representation, such as javabin, would be more efficient.
 
  If using javabin, or some similar efficient binary stream to interface
 SOLR
  with PHP is not possible, what do people recommend as the most efficient
  solution that provides the best performance, even if that means not using
  PHP and going with some other alternative?

 I'd recommend going with JSON - it will be quite a bit smaller than
 XML, and the parsers are generally quite efficient.

 -Yonik
 http://lucenerevolution.org  Lucene/Solr Conference, Boston Oct 7-8



Re: Problems indexing spatial field - undefined subField

2010-09-01 Thread Thomas Joiner
While you have already solved your problem, my guess as to why it didn't
work originally is that you probably didn't have a
dynamicField name=*_latLon indexed=true stored=true /

What subFieldType does is it registers a dynamicField for you.
 subFieldSuffix requires that you have already defined that dynamicField.

On Tue, Aug 31, 2010 at 8:07 PM, Simon Wistow si...@thegestalt.org wrote:

 On Wed, Sep 01, 2010 at 01:05:47AM +0100, me said:
  I'm trying to index a latLon field.
 
  fieldType name=latLon class=solr.LatLonType
 subFieldSuffix=_latLon/
  field name=location type=latLon  indexed=true  stored=true/

 Turns out changing it to

 fieldType name=latLon class=solr.LatLonType subFieldType=double/

 fixed it.





Re: how to deal with virtual collection in solr?

2010-08-26 Thread Thomas Joiner
I don't know about the shards, etc.

However I recently encountered that exception while indexing pdfs as well.
 The way that I resolved it was to upgrade to a nightly build of Solr. (You
can find them https://hudson.apache.org/hudson/view/Solr/job/Solr-trunk/).

The problem is that the version of Tika that 1.4.1 using is a very old
version of Tika, which uses a old version of PDFBox to do its parsing.  (You
might be able to fix the problem just by replacing the Tika jars...however I
don't know if there have been any API changes so I can't really suggest
that.)

We didn't upgrade to trunk in order for that functionality, but it was nice
that it started working. (The PDFs we'll be indexing won't be of later
versions, but a test file was).

On Thu, Aug 26, 2010 at 1:27 PM, Ma, Xiaohui (NIH/NLM/LHC) [C] 
xiao...@mail.nlm.nih.gov wrote:

 Thanks so much for your help, Jan Høydahl!

 I made multiple cores (aa public, aa private, bb public and bb private). I
 knew how to query them individually. Please tell me if I can do a
 combinations through shards parameter now. If yes, I tried to append
 shards=aapub,bbpub after query string. Unfortunately it didn't work.

 Actually all of content is the same. I don't have collection field in xml
 files. Please tell me how I can set a collection field in schema and
 simply search collection through filter.

 I used curl to index pdf files. I use Solr 1.4.1. I got the following error
 when I index pdf with version 1.5 and 1.6.

 *
 html
 head
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1/
 titleError 500 /title
 /head
 bodyh2HTTP ERROR: 500/h2preorg.apache.tika.exception.TikaException:
 Unexpected RuntimeException from
 org.apache.tika.parser.pdf.pdfpar...@134ae32

 org.apache.solr.common.SolrException:
 org.apache.tika.exception.TikaException: Unexpected RuntimeException from
 org.apache.tika.parser.pdf.pdfpar...@134ae32
at
 org.apache.solr.handler.extraction.ExtractingDocumentLoader.load(ExtractingDocumentLoader.java:211)
at
 org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:54)
at
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
at
 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
at
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
at
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
at
 org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:835)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:641)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:202)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
at
 org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
at
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
 Caused by: org.apache.tika.exception.TikaException: Unexpected
 RuntimeException from org.apache.tika.parser.pdf.pdfpar...@134ae32
at
 org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:121)
at
 org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:105)
at
 org.apache.solr.handler.extraction.ExtractingDocumentLoader.load(ExtractingDocumentLoader.java:190)
... 22 more
 Caused by: java.lang.NullPointerException
at org.pdfbox.pdmodel.PDPageNode.getAllKids(PDPageNode.java:194)
at org.pdfbox.pdmodel.PDPageNode.getAllKids(PDPageNode.java:182)
at
 org.pdfbox.pdmodel.PDDocumentCatalog.getAllPages(PDDocumentCatalog.java:226)
at
 org.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:216)
at org.pdfbox.util.PDFTextStripper.getText(PDFTextStripper.java:149)
at org.apache.tika.parser.pdf.PDF2XHTML.process(PDF2XHTML.java:53)
at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:51)
at
 

Re: Having problems with the java api in 1.4.0

2010-08-24 Thread Thomas Joiner
Is there any reason you aren't using http://wiki.apache.org/solr/Solrj to
interact with Solr?

On Tue, Aug 24, 2010 at 11:12 AM, Liz Sommers lizswo...@gmail.com wrote:

 I am very new to the solr/lucene world.  I am using solr 1.4.0 and cannot
 move to 1.4.1.

 I have to index about 50 fields for each document, these fields are already
 in key/value pairs by the time I get to my index methods.  I was able to
 index them with lucene without any problem, but found that I could not then
 read the indexes with solr/admin.  So, I decided to use Solr for my
 indexing.

 The error I am currently getting is
 java.lang.RuntimeException: Can't find resource 'synonyms.txt' in classpath
 or 'solr/conf'/'

 This exception is being thrown by SolrResourceLoader.openResource(line
 260).
 which is called by IndexSchemainit (line 102)

 My code that leads up to this follows:

 code
 String path = c:/swdev/apache-solr-1.4.0/IDW
 SolrConfig cfg new SolrConfig(path + /solr/conf/solrconfig.xml);
 schema = new IndexSchema(cfg,path + /solr/conf/schema.xml,null);

 /code

 This also fails if I use
 schema = new IndexSchema(cfg,schema.xml,null);


 Any help would be greatly appreciated.

 Thank you

 Liz Sommers
 lizswo...@gmail.com



proper query handling for multiValued queries that are also polyFields?

2010-08-20 Thread Thomas Joiner
I am wondering...is there currently any way for queries to properly handle
multiValued polyFields?

For instance, if you have a

field name=point type=location indexed=true stored=true
multiValued=true /

And if you added two values to that field such as 1,2 and 3,4, that
would match both 1,4, and 3,2 as well as 1,2 and 3,4.

So I'm wondering if that is something that someone has figured out a
solution, or something that I should open a JIRA issue for?


Re: how to create a custom type in Solr

2010-08-16 Thread Thomas Joiner
Sorry to bother you, but since I haven't had a reply in a week, I figured
I'd try asking again...

What build of Solr are you using personally?  Are you just using a nightly
build, or is there a specific build that you are using?  Has it had any
major screw-ups for you?

And I still would love to see your code.

Regards,
Thomas

On Mon, Aug 9, 2010 at 8:50 AM, Thomas Joiner thomas.b.joi...@gmail.comwrote:

 I'd love to see your code on this, however what I've really been wondering
 is the following: When did AbstractSubTypeFieldType get added?  It isn't in
 1.4.1 (as far as I can tell that's the latest one that is bundled on their
 site).  So, do I just need to grab it from subversion, and build it?  And if
 so, is there a particular revision that I should go with?  Or should I just
 pull trunk and use that, and last of all, is trunk stable enough to be used
 in production?

 Regards,
 Thomas


 On Mon, Aug 9, 2010 at 8:38 AM, Mark Allan mark.al...@ed.ac.uk wrote:

 On 9 Aug 2010, at 1:01 pm, Otis Gospodnetic wrote:

  Mark,

 A good way to get your changes/improvements into Solr is by putting them
 in
 JIRA.  Please see http://wiki.apache.org/solr/HowToContribute

 Thanks!
 Otis



 Hi Otis,

 For the class which requires only minor modifications, I tested it to
 ensure it doesn't break existing compatibility/functionality, and then I
 created an issue in JIRA and uploaded a patch:
https://issues.apache.org/jira/browse/SOLR-1986

 I then posted a message about it to the list and got the following
 responses.

 On 7 Jul 2010, at 6:24 pm, Yonik Seeley wrote:

 On Wed, Jul 7, 2010 at 8:15 AM, Grant Ingersoll gsing...@apache.org
 wrote:

 Originally, I had intended that it was just for one Field Sub Type,
 thinking that if we ever wanted multiple sub types, that a new, separate
 class would be needed


 Right - this was my original thinking too.  AbstractSubTypeFieldType is
 only a convenience class to create compound types... people can do it other
 ways.

 -Yonik
 http://www.lucidimagination.com



 When I replied to ask if that meant the changes wouldn't be included, I
 got no response. As there's been no activity in JIRA, I didn't bother
 putting any of my other changes into JIRA as they all relied on that one.
 Mark


 --
 The University of Edinburgh is a charitable body, registered in
 Scotland, with registration number SC005336.





Re: how to create a custom type in Solr

2010-08-16 Thread Thomas Joiner
Thanks you very much.

I know the feeling, I've definitely had times when I just got busy and
didn't reply, but I've had plenty to do that didn't require that to be done
first, so no worries.

Thanks,
Thomas

On Mon, Aug 16, 2010 at 9:14 AM, Mark Allan mark.al...@ed.ac.uk wrote:

 Hi Thomas,

 Sorry for not replying before now - I've had your email flagged in my mail
 client to remind me to reply, but I've been so busy recently I never got
 round to it.

 I'll package up the necessary java files and send you the attachment
 directly instead of posting a zip file to the mailing list, which in most
 places would be against list etiquette.

 Mark


 On 16 Aug 2010, at 3:01 pm, Thomas Joiner wrote:

  Sorry to bother you, but since I haven't had a reply in a week, I figured
 I'd try asking again...

 What build of Solr are you using personally?  Are you just using a nightly
 build, or is there a specific build that you are using?  Has it had any
 major screw-ups for you?

 And I still would love to see your code.

 Regards,
 Thomas

 On Mon, Aug 9, 2010 at 8:50 AM, Thomas Joiner thomas.b.joi...@gmail.com
 wrote:

  I'd love to see your code on this, however what I've really been
 wondering
 is the following: When did AbstractSubTypeFieldType get added?  It isn't
 in
 1.4.1 (as far as I can tell that's the latest one that is bundled on
 their
 site).  So, do I just need to grab it from subversion, and build it?  And
 if
 so, is there a particular revision that I should go with?  Or should I
 just
 pull trunk and use that, and last of all, is trunk stable enough to be
 used
 in production?

 Regards,
 Thomas


 On Mon, Aug 9, 2010 at 8:38 AM, Mark Allan mark.al...@ed.ac.uk wrote:

  On 9 Aug 2010, at 1:01 pm, Otis Gospodnetic wrote:

 Mark,


 A good way to get your changes/improvements into Solr is by putting
 them
 in
 JIRA.  Please see http://wiki.apache.org/solr/HowToContribute

 Thanks!
 Otis



 Hi Otis,

 For the class which requires only minor modifications, I tested it to
 ensure it doesn't break existing compatibility/functionality, and then I
 created an issue in JIRA and uploaded a patch:
  https://issues.apache.org/jira/browse/SOLR-1986

 I then posted a message about it to the list and got the following
 responses.

 On 7 Jul 2010, at 6:24 pm, Yonik Seeley wrote:

  On Wed, Jul 7, 2010 at 8:15 AM, Grant Ingersoll gsing...@apache.org
 wrote:

  Originally, I had intended that it was just for one Field Sub Type,
 thinking that if we ever wanted multiple sub types, that a new,
 separate
 class would be needed


 Right - this was my original thinking too.  AbstractSubTypeFieldType is
 only a convenience class to create compound types... people can do it
 other
 ways.

 -Yonik
 http://www.lucidimagination.com



 When I replied to ask if that meant the changes wouldn't be included, I
 got no response. As there's been no activity in JIRA, I didn't bother
 putting any of my other changes into JIRA as they all relied on that
 one.
 Mark



 --
 The University of Edinburgh is a charitable body, registered in
 Scotland, with registration number SC005336.




Re: how to create a custom type in Solr

2010-08-09 Thread Thomas Joiner
I'd love to see your code on this, however what I've really been wondering
is the following: When did AbstractSubTypeFieldType get added?  It isn't in
1.4.1 (as far as I can tell that's the latest one that is bundled on their
site).  So, do I just need to grab it from subversion, and build it?  And if
so, is there a particular revision that I should go with?  Or should I just
pull trunk and use that, and last of all, is trunk stable enough to be used
in production?

Regards,
Thomas

On Mon, Aug 9, 2010 at 8:38 AM, Mark Allan mark.al...@ed.ac.uk wrote:

 On 9 Aug 2010, at 1:01 pm, Otis Gospodnetic wrote:

  Mark,

 A good way to get your changes/improvements into Solr is by putting them
 in
 JIRA.  Please see http://wiki.apache.org/solr/HowToContribute

 Thanks!
 Otis



 Hi Otis,

 For the class which requires only minor modifications, I tested it to
 ensure it doesn't break existing compatibility/functionality, and then I
 created an issue in JIRA and uploaded a patch:
https://issues.apache.org/jira/browse/SOLR-1986

 I then posted a message about it to the list and got the following
 responses.

 On 7 Jul 2010, at 6:24 pm, Yonik Seeley wrote:

 On Wed, Jul 7, 2010 at 8:15 AM, Grant Ingersoll gsing...@apache.org
 wrote:

 Originally, I had intended that it was just for one Field Sub Type,
 thinking that if we ever wanted multiple sub types, that a new, separate
 class would be needed


 Right - this was my original thinking too.  AbstractSubTypeFieldType is
 only a convenience class to create compound types... people can do it other
 ways.

 -Yonik
 http://www.lucidimagination.com



 When I replied to ask if that meant the changes wouldn't be included, I got
 no response. As there's been no activity in JIRA, I didn't bother putting
 any of my other changes into JIRA as they all relied on that one.
 Mark


 --
 The University of Edinburgh is a charitable body, registered in
 Scotland, with registration number SC005336.




how to create a custom type in Solr

2010-08-06 Thread Thomas Joiner
I need to have a field that supports ranges...for instance, you specify a
range of 8000 to 9000 and if you search for 8500, it will hit.  However,
when googling, I really couldn't find any resources on how to create your
own field type in Solr.

But from what I was able to find, the AbstractSubTypeFieldType class seems
like a good starting point for the type that I want to make, however that
isn't in the current version of Solr that I am using (1.4.1).  So I guess my
question is: is Solr 3.0 ready for production?  If so, how do I get it? Do I
just need to checkout the code from svn and build it myself?  If so should I
just check out the latest, or is there a particular branch that I should go
with that is reliable?  If I switch to 3.0, will I need to reindex my data,
or has the data format not changed?

And if 3.0 isn't ready for production, what would you suggest I do?  Is the
AbstractSubTypeFieldType such that I can backport it and use it with 1.4.1,
or does it use specific features of 3.0 that I would have to backport as
well, in which case it would become a horribly convoluted mess where I would
be better off just going with 3.0.  And I guess this comes back to help on
finding resources about implementing custom types...it would just be more
complicated if I couldn't use the AbstractSubTypeFieldType.

(This is my first time posting to a mailing list, so if I have violated
horribly some etiquette of mailing lists, please tell me).

Regards,
Thomas


Re: how to create a custom type in Solr

2010-08-06 Thread Thomas Joiner
This will work for a single range.  However, I may need to support multiple
ranges, is there a way to do that?

On Fri, Aug 6, 2010 at 10:49 AM, Jan Høydahl / Cominvent 
jan@cominvent.com wrote:

 Your use case can be solved by splitting the range into two int's:

 Document: {title: My document, from: 8000, to: 9000}
 Query: q=title:My AND (from:[* TO 8500] AND to:[8500 TO *])

 --
 Jan Høydahl, search solution architect
 Cominvent AS - www.cominvent.com
 Training in Europe - www.solrtraining.com

 On 6. aug. 2010, at 17.02, Thomas Joiner wrote:

  I need to have a field that supports ranges...for instance, you specify a
  range of 8000 to 9000 and if you search for 8500, it will hit.  However,
  when googling, I really couldn't find any resources on how to create your
  own field type in Solr.
 
  But from what I was able to find, the AbstractSubTypeFieldType class
 seems
  like a good starting point for the type that I want to make, however that
  isn't in the current version of Solr that I am using (1.4.1).  So I guess
 my
  question is: is Solr 3.0 ready for production?  If so, how do I get it?
 Do I
  just need to checkout the code from svn and build it myself?  If so
 should I
  just check out the latest, or is there a particular branch that I should
 go
  with that is reliable?  If I switch to 3.0, will I need to reindex my
 data,
  or has the data format not changed?
 
  And if 3.0 isn't ready for production, what would you suggest I do?  Is
 the
  AbstractSubTypeFieldType such that I can backport it and use it with
 1.4.1,
  or does it use specific features of 3.0 that I would have to backport as
  well, in which case it would become a horribly convoluted mess where I
 would
  be better off just going with 3.0.  And I guess this comes back to help
 on
  finding resources about implementing custom types...it would just be more
  complicated if I couldn't use the AbstractSubTypeFieldType.
 
  (This is my first time posting to a mailing list, so if I have violated
  horribly some etiquette of mailing lists, please tell me).
 
  Regards,
  Thomas