Highlight question

2010-06-23 Thread Gregg Hoshovsky
I just started working with the highlighting.  I am using the default 
configurations. I have a field that I can get a single highlight to occur 
marking the data.

What I would like to do is this,

Given a word say 'tumor', and the sentence

" the lower tumor grew 1.5 cm. blah blah blah  we need to remove the tumor in 
the next surgery"

I would like to get ."... the lower tumor grew 1.5 cm . blah blah 
blah  we need to ... remove the tumor in the next . surgery"

Thus finding multiple references to the work and  only grabbing a few words 
around it.



In the solrconfig.xml I have been able to change the hl.simple.pre/post 
variable, but when I try to change the hl,regex pattern or the hl.snippets they 
don't have any effect. I thought the hl.snippets would alow me to find more 
than one and highlight it, and well I tried a bunch of regex patterns but they 
didn't do anything.

here is a snippet of the config file.

Any help is appreciated.

Gregg


   
   

  
  4  70
  
  0.2
  
  [-\w ,/\n\"']{1,1}

   

   
   

  4
 100
 
 




Re: Solr and NLP

2010-07-02 Thread Gregg Hoshovsky
I saw mention earlier about a way to link in openNLP into solr ( 
http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Optimizing-Findability-Lucene-and-Solr)

.I haven't followed up on that yet so I don't know much about  it. However if 
you do figure anything out please share your findings.  I will have to venture 
down this path someday myself.


Gregg



On 7/2/10 8:15 AM, "Moazzam Khan"  wrote:

Hi guys,

Is there a way I can make Solr work with an NLP application? Are there
any NLP applications that will work with Solr? Can someone please
point me to a tutorial or something if it's possible.

Thanks,

Moazzam



Help on spelling.

2010-09-09 Thread Gregg Hoshovsky
I am trying to use the spellchecker but cannot get past the point of having the 
spelling possibilities returned.

I have a text field define in the schema.xml file as:

   

I modified solrconfig.xml to point the analyzer to the same field type and have 
the name set the same.

  

text_ws


  default
  text
  ./spellchecker



I left the handler alone

  


I see that the spellchecker folder gets files built so I am assuming that the 
spelling data is being created

Then I ran the query as
http://localhost:8983/solr/biolibrary/spell/?q=text:wedg&version=2.2&start=0&rows=10&indent=on&wt=json

I would expect that this would have returned some spelling suggestions ( such 
as wedge) but don’t get anything besides:

{
 "responseHeader":{
  "status":0,
  "QTime":1},
 "response":{"numFound":0,"start":0,"docs":[]
 }}

Any help is appreciated.

Gregg



Re: Help on spelling.

2010-09-09 Thread Gregg Hoshovsky


Okay putting "spellcheck=true" makes all the difference in the world.

 Thanks


On 9/9/10 1:58 PM, "Markus Jelsma"  wrote:

> I don't see you passing spellcheck parameters in the query string. Are they
> configured as default in your search handler?
>  
> -----Original message-
> From: Gregg Hoshovsky 
> Sent: Thu 09-09-2010 22:40
> To: solr-user@lucene.apache.org;
> Subject: Help on spelling.
> 
> I am trying to use the spellchecker but cannot get past the point of having
> the spelling possibilities returned.
> 
> I have a text field define in the schema.xml file as:
> 
>    multiValued="true"/>
> 
> I modified solrconfig.xml to point the analyzer to the same field type and
> have the name set the same.
> 
>  
> 
>    text_ws
> 
>    
>      default
>      text
>      ./spellchecker
>    
> 
> 
> I left the handler alone
> 
>  
>    
> 
> I see that the spellchecker folder gets files built so I am assuming that the
> spelling data is being created
> 
> Then I ran the query as
> http://localhost:8983/solr/biolibrary/spell/?q=text:wedg&version=2.2&start=0&r
> ows=10&indent=on&wt=json
> 
> I would expect that this would have returned some spelling suggestions ( such
> as wedge) but don t get anything besides:
> 
> {
> "responseHeader":{
>  "status":0,
>  "QTime":1},
> "response":{"numFound":0,"start":0,"docs":[]
> }}
> 
> Any help is appreciated.
> 
> Gregg
> 



Re: Getting solr response data in a JS query

2010-01-11 Thread Gregg Hoshovsky
You might be running into  an Ajax restriction.

See if an article like this helps.


http://www.nathanm.com/ajax-bypassing-xmlhttprequest-cross-domain-restriction/


On 1/9/10 11:37 PM, "Otis Gospodnetic"  wrote:

Dan,

You didn't mention whether you tried &wt=json .  Does it work if you use that 
to tell Solr to return its response in JSON format?

 Otis
--
Sematext -- http://sematext.com/ -- Solr - Lucene - Nutch



- Original Message 
> From: Dan Yamins 
> To: solr-user@lucene.apache.org
> Sent: Sat, January 9, 2010 10:05:54 PM
> Subject: Getting solr response data in a JS query
>
> Hi:
>
> I'm trying to use figure out how to get solr responses and use them in my
> website.I'm having some problems figure out how to
>
> 1) My initial thought is is to use ajax, and insert a line like this in my
> script:
>
>  data = eval($.get("http://localhost:8983/solr/select/?q=*:*
> ").responseText)
>
> ... and then do what I want with the data, with logic being done in
> Javascript on the front page.
>
> However, this is just not working technically:  no matter what alternative I
> use, I always seem to get no response to this query.  I think I'm having
> exactly the same problem as described here:
>
> http://www.mail-archive.com/solr-user@lucene.apache.org/msg29949.html<%20http://www.mail-archive.com/solr-user@lucene.apache.org/msg29949.html>
>
> and here:
>
> http://stackoverflow.com/questions/1906498/solr-responses-to-webbrowser-url-but-not-from-javascript-code
>
> Just like those two OPs, I can definitely access my solr responese through a
> web browser, but my jquery is getting nothing.Unfortunately, in neither
> thread did the answer seem to have been figured out satisfactorily.   Does
> anybody know what the problem is?
>
>
> 2)  As an alternative, I _can_ use  the ajax-solr library.   Code like this:
>
> var Manager;
> (function ($) {
>   $(function () {
> Manager = new AjaxSolr.Manager({
>   solrUrl: 'http://localhost:8983/solr/'
>});
>
>   Manager.init();
>   Manager.store.addByValue('q', '*:*');
>   Manager.store.addByValue('rows', '1000');
>   Manager.doRequest();
>   });
> })(jQuery);
>
> does indeed load solr data into my DOM.Somehow, ajax-solr's doRequest
> method is doing something that makes it possible to receive the proper
> response from the solr servlet, but I don't know what it is so I can't
> replicate it with my own ajax.   Does anyone know what is happening?
>
> (Of course, I _could_ just use ajax-solr, but doing so would mean figuring
> out how to re-write my existing application for how to display search
> results in a form that works with the ajax-solr api, and I' d rather avoid
> this if possible since it looks somewhat nontrivial.)
>
>
> Thanks!
> Dan




Re: DIH field options

2010-03-13 Thread Gregg Hoshovsky
You can use mysql , select *, “staticdata” as staticdata from table x.
As long as your  field name is staticdata, this should add it there.


On 3/12/10 8:39 AM, "Tommy Chheng"  wrote:

 Haven't tried this myself but try adding a default value  and don't
specify it during the import.
http://wiki.apache.org/solr/SchemaXml


On 3/12/10 7:56 AM, blargy wrote:
> Forgive me but I'm slightly retarded... I grew up underneath some power lines
> ;)
>
> I've read through that wiki but I still can't find what I'm looking for. I
> just want to give one of the DIH entities/fields a static value (ie it
> doesnt come from a database column). How can I configure this?
>
> FYI this is data-config.xml not schema.xml.
>
>
>  
>
>
>  
>
>
>
>
>
> Tommy Chheng-4 wrote:
>>The wiki page has most of the info you need
>> *http://wiki*.apache.org/*solr*/DataImportHandler
>>
>> To use multi-value fields, your schema.xml must define it with
>> multiValued="true"
>>
>>
>> On 3/11/10 10:58 PM, blargy wrote:
>>> How can you simply add a static value like?>> value="123"/>
>>> How does one add a static multi-value field?>> values="123, 456"/>
>>>
>>> Is there any documentation on all the options for the field tag in
>>> data-config.xml?
>>>
>>> Thanks for the help
>> --
>> Tommy Chheng
>> Programmer and UC Irvine Graduate Student
>> Twitter @tommychheng
>> http://tommy.chheng.com
>>
>>
>>

--
Tommy Chheng
Programmer and UC Irvine Graduate Student
Twitter @tommychheng
http://tommy.chheng.com