Comments (13)
You'll have to provide more information. Works fine at http://evolvingweb.github.io/ajax-solr/examples/reuters/index.html and works locally for me.
from ajax-solr.
Hello, my bad......: ) Thanks anyways....now the reuters data is coming up.....bumped into another issue...
replaced the reuter's URL with my localhost SOLR server URL - unfortunately it ain't fetching anything....Suggestions?
The SOLR URL is working perfectly fine .
from ajax-solr.
What URL did you put into ajax-solr?
from ajax-solr.
http://localhost:8983/solr/ as has been mentioned in the tutorial
from ajax-solr.
Does visiting that URL redirect anywhere, or does it just load the Solr interface?
from ajax-solr.
It's probably that your data doesn't match the schema of the Reuters Solr instance. Opening index.html won't instantly work with your Solr instance. You need to follow the tutorial step-by-step and make changes as necessary, making sure it works at every step.
from ajax-solr.
Ok...the reuters page is working anyways - it was my bad.
So let me follow the entire tutorial and get back in case of any issues. Thanks for being prompt in your response.
from ajax-solr.
Hello,
I am at Step 2 (Add a results widget). Below is the extract of my json
"docs": [
{
"a_name": "data1",
"a_desc": "data1",
"quarter": "data1",
"year": "data1",
"id": "data1",
"crea_by": "data1",
"actv_name": "data1",
"day": "data1",
"app_name": "data1",
"module": "data1",
"month": "data1",
"version": data1
},
{}]
which is coming properly from SOLR.
Below is the extract from ResultWidget.js
afterRequest: function () {
$(this.target).empty();
for (var i = 0, l = this.manager.response.response.docs.length; i < l; i++) {
var doc = this.manager.response.response.docs[i];
$(this.target).append(this.template(doc));
var items = [];
items = items.concat(this.facetLinks('topics', doc.app_name));
items = items.concat(this.facetLinks('organisations', doc.module));
items = items.concat(this.facetLinks('exchanges', doc.month));
var $links = $('#links_' + doc.id);
$links.empty();
for (var j = 0, m = items.length; j < m; j++) {
$links.append($('<li></li>').append(items[j]));
}
}
},
template: function (doc) {
var snippet = '';
if (doc.a_name.length > 300) {
snippet += doc.month + ' ' + doc.a_name.substring(0, 300);
snippet += '' + doc.a_name.substring(300);
snippet += ' more';
}
else {
snippet += doc.month + ' ' + doc.a_name;
}
var output = '<div><h2>' + doc.a_desc + '</h2>';
output += '<p id="links_' + doc.id + '" class="links"></p>';
output += '<p>' + snippet + '</p></div>';
return output;
},
I have the appropriate changes.
Still the data is not being shown from my SOLR instance. Please advise.
from ajax-solr.
The first parameter to facetLinks doesn’t look correct. It should match the field name.
On Nov 24, 2014, at 4:05 PM, reviliant [email protected] wrote:
Hello,
I am on Step 2 (Add a results widget). Below are the extract of my json"docs": [
{
"a_name": "data1",
"a_desc": "data1",
"quarter": "data1",
"year": "data1",
"id": "data1",
"crea_by": "data1",
"actv_name": "data1",
"day": "data1",
"app_name": "data1",
"module": "data1",
"month": "data1",
"version": data1
},
{}]which is coming properly from SOLR.
Below is the extract from ResultWidget.js
afterRequest: function () {
$(this.target).empty();
for (var i = 0, l = this.manager.response.response.docs.length; i < l; i++) {
var doc = this.manager.response.response.docs[i];
$(this.target).append(this.template(doc));
var items = [];
items = items.concat(this.facetLinks('topics', doc.app_name));
items = items.concat(this.facetLinks('organisations', doc.module));
items = items.concat(this.facetLinks('exchanges', doc.month));var
').append(items[j]));$links = $ ('#links_' + doc.id);
$links.empty();
for (var j = 0, m = items.length; j < m; j++) {
$links.append($('
}
}
},template: function (doc) {
var snippet = '';
if (doc.a_name.length > 300) {
snippet += doc.month + ' ' + doc.a_name.substring(0, 300);
snippet += '' + doc.a_name.substring(300);
snippet += ' more';
}
else {
snippet += doc.month + ' ' + doc.a_name;
}var output = '
';' + doc.a_desc + '
';
output += '';
output += '' + snippet + '
return output;
},I have the appropriate changes.
Still the data is not being shown from my SOLR instance. Please advise.
—
Reply to this email directly or view it on GitHub.
from ajax-solr.
Do you mean
items = items.concat(this.facetLinks('app_name', doc.app_name));
Got you....
from ajax-solr.
Edited in reuters.js, index.html as well as ResultWidget.js but no luck!
from ajax-solr.
Did you check your JavaScript console for errors? Chrome, Firefox, and Safari have good JS error consoles.
from ajax-solr.
Hello James, Yeah was doing that right now...will keep you posted...I thought it will be straight forward, but it seems like some work :).
Anyways thanks for the help..Will keep you posted about how it goes!
from ajax-solr.
Related Issues (20)
- Add a widget that uses MoreLikeThis
- Support for SpellCheckComponent HOT 1
- Add a widget that uses TermsComponent
- Add a widget for multiselect facets with configurable operand
- Inheritance not working? HOT 5
- Websolr integration HOT 7
- Better escaping
- auto widget creation based on return factes HOT 1
- Demo not working HOT 3
- PagerWidget.js / ParameterHistoryStore.js / history.js IE Issue HOT 2
- Unable to fetch data from local solr application using ajax solr HOT 3
- Add a bower package
- ERROR: Cannot read property 'length' of undefined HOT 1
- Demo website broken? HOT 1
- Not able to show the Calendar widget HOT 2
- Phrase level autosuggestions using suggesters
- Demo Site Not Working HOT 6
- Ajax-Solr not work after change jquery.min.js 1.7.2 to newer version (1.11.2)
- Range widget
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ajax-solr.