Solr Suggester component not returning any results

2019-03-19 Thread Deoxyribonucleic_DNA ...
Hi, I'm trying to implement the suggester component in Solr,  based off the 
tutorial:

https://lucene.apache.org/solr/guide/7_7/suggester.html#suggester-search-component-parameters

I'm not getting any errors about how the suggester is set up or anything, but 
when I try to use it I get 0 results returned. Including images of the 
schema/config parts I added to my files, as shown to do in the tutorial, can 
someone take a look? Or does anyone have any suggestions based on prior 
experience or common problems?

Also, I've got solr 7.6. There wasn't some change that would affect this just 
in that slight version change was there? I

Thanks in advance.

[cid:0e5daa48-57aa-439d-a227-8ad4d2249e18]


[cid:f73bacaf-e3b4-4767-b42a-55d53678b623]

Link used in search:


http://localhost:8984/solr/nutch/suggest?suggest=true&suggest.build=true&suggest.dictionary=mySuggester&suggest.q=Canad

(due to documents containing "Canada" as the intended word)

Result:

[cid:d8bec75d-1d45-4b5f-8dc7-3ffaf22ee7a7]


HTML/JavaScript Query and Results Display Not Working

2019-03-21 Thread Deoxyribonucleic_DNA ...
I am trying working off of https://wiki.apache.org/solr/SolJSON tutorial. I 
have put my url for solr in the code, copied from solr admin query result to 
make sure the query should return something.

I try typing in "title:Asian" into text box but when the button is hit, textbox 
just clears and nothing in output spot.

I used the dev tools from [F12] key of browser to check console and see there 
was no errors given there, such as for syntax, so not due to that.

Perhaps I am understanding how the url for query works or should be here? If I 
leave out local host part as shown I just get error for not specifying local 
full path.




Solr Ajax Example


// derived from http://www.degraeve.com/reference/simple-ajax-example.php
function xmlhttpPost(strURL)
{
var xmlHttpReq = false;
var self = this;

if (window.XMLHttpRequest) { // Mozilla/Safari
self.xmlHttpReq = new XMLHttpRequest();
}
else if (window.ActiveXObject) { // IE
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}

self.xmlHttpReq.open('POST', strURL, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 
'application/x-www-form-urlencoded');


self.xmlHttpReq.onreadystatechange = function() {
if (self.xmlHttpReq.readyState == 4) {
updatepage(self.xmlHttpReq.responseText);
}
};

var params = getstandardargs().concat(getquerystring());
var strData = params.join('&');
self.xmlHttpReq.send(strData);
//document.getElementById("raw").innerHTML = strData;
return false;
}

function getstandardargs() {
var params = [
'wt=json'
, 'indent=on'
, 'hl=true'
];

return params;
}
function getquerystring() {
  var form = document.forms['f1'];
  var query = form.query.value;
  qstr = 'q=' + escape(query);
  return qstr;
}

// this function does all the work of parsing the solr response and updating 
the page.
function updatepage(str)
{
  document.getElementById("raw").innerHTML = str;
  var rsp = eval("("+str+")"); // use eval to parse Solr's JSON response
  var html = "
numFound=" + rsp.response.numFound; var first = rsp.response.docs[0]; html += "
product name=" + first.name; var hl = rsp.highlighting[first.id]; if (hl.name != null) { html += "
name highlighted: " + hl.name[0]; } if (hl.features != null) { html += "
features highligted: " + hl.features[0]; } document.getElementById("result").innerHTML = html; } query: Raw JSON String/output:

Solr Spell Check not giving results back

2019-03-25 Thread Deoxyribonucleic_DNA ...
Hi could some one take look at the scheme/config stuff I've set up trying to 
implement spell check? I'm not getting anything back for misspellings of words 
and can't tell what has gone wrong.

query:
http://localhost:8983/solr/myCore/select?spellcheck.build=true&wt=json&indent=on&hl=true&spellcheck=on&spellcheck.q=asie

scheme/config:

[cid:94b9ba87-178d-4159-9bc5-9799420236a7]