as long as you are working on your own pc than this might be ok. but when someone else is accessing the site via internet, than there is "no localhost", at least not your. so at this point the real (internet-) server name is needed. btw: ajax calls are only allowed from the origin server, so a page loaded from
www.a-server.com only will allow ajax-calls that also go to www.a-server.com, and not www.b-server.com or any other -- mit freundlichen Grüßen Markus Rietzler - <rietzler_software/> Rechenzentrum der Finanzverwaltung NRW 0211/4572-2130 > -----Ursprüngliche Nachricht----- > Von: sophSophie [mailto:sop...@beezik.com] > Gesendet: Freitag, 30. Oktober 2009 14:57 > An: solr-user@lucene.apache.org > Betreff: Re: AW: JQuery and autosuggest > > > Hallo Markus ! > > I think that the servername is correct as I'm testing this > autocomplete box > on my computer (my site is built in localhost, solr is in localhost). > > Am I wrong ? > > Thanks > > > Markus.Rietzler wrote: > > > > very simple, in the javascript you have > > > > $("#artist").autocomplete( > > 'http://localhost:8983/solr/completion/select/?wt=json', { > > > > you have to change localhost to the correct servername > > > > > > -- > > mit freundlichen Grüßen > > > > Markus Rietzler - <rietzler_software/> > > Rechenzentrum der Finanzverwaltung NRW > > 0211/4572-2130 > > > > > >> -----Ursprüngliche Nachricht----- > >> Von: sophSophie [mailto:sop...@beezik.com] > >> Gesendet: Freitag, 30. Oktober 2009 14:35 > >> An: solr-user@lucene.apache.org > >> Betreff: JQuery and autosuggest > >> > >> > >> Hello, > >> > >> I'm trying to build a autocomplete text box. I think that > >> everything is ok > >> in the schema.xml and the solrconfig.xml side as I have > >> correct responses > >> through the solr admin page (I got something like that > >> :http://brainmaths.fr/IMG/response.txt ). > >> > >> I don't know really javascript and I tried the code given in > >> Solr 1.4 book > >> page 241. You can see what I did here : > >> http://brainmaths.fr/IMG/completion.html and have a look to > >> the source code. > >> > >> The query is correcty sent to solr (I checked the log) but > >> nothing returns > >> and I have an error on this line : > >> > >> return $.map(data.response.docs, function(doc) { > >> > >> The error is : response.docs is null or isn't an object, I > >> don't know how to > >> fix it. I guess that docs aren't correctly returned. > >> > >> I need any help any ideas > >> > >> Thanks in advance > >> > >> ----- > >> English is not my mother tongue :) > >> -- > >> View this message in context: > >> > http://old.nabble.com/JQuery-and-autosuggest-tp26130209p26130209.html > >> Sent from the Solr - User mailing list archive at Nabble.com. > >> > >> > > > > > > > ----- > English is not my mother tongue :) > -- > View this message in context: > http://old.nabble.com/JQuery-and-autosuggest-tp26130209p26130511.html > Sent from the Solr - User mailing list archive at Nabble.com. > >