-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FacetsView Custom #28
Comments
Just set your search_url to http://extremesearch.cloudapp.net:9200/turbomanga/manga/_search? Although I note from looking at that page there is a JSON error on it - would have to fix that on your own server side too, perhaps, it could be caused by something in your raw data that will be fine when queried against, just try it and see. Also depending on if you are searching cross-domain or not, have a look at the option to set either JSON or JSONP. |
Oh ok thx! But I think I found an another way to do that! I need to know how can I change the request, I wanna do a POST, not a GET, how can I fix that? |
Ah OK, there is no option for that, but you can edit the dosearch() method directly in your local copy - line 1097. I may add that as a configurable option. |
I see it, I change it, and this isn't working! ='/ $.ajax({ That's always send a GET! Damn it! |
Ah yes, of course, in order to send a POST you would also have to change the way the data is being delivered. Forgot about that. data: {source: qrystr} is going to try to send a query parameter called source, which may be defaulting the ajax back to a GET. The data for a POST should probably be acceptable as just the JSON representation of the query rather than the string version. Try changing those settings around a bit until you get something that works - I have found when using elasticsearch endpoints with different providers they sometimes will only accept certain forms of ajax requests. |
Ok great! Thx for the help! x) |
One more thing! xD I don't find any prob with my json, and I can do all request in it directly, so I don't think the prob was there, but, If I want to make a query like you with this : "http://extremesearch.cloudapp.net/query?" this isn't working... I just want to make a request on a title like this : [{"_index":"turbomanga","_type":"manga","_id":"21","_score":0.2623265, "_source" : { "title": "gundam seed" ,"description": ""Terrestrial Defense Corp. Dai-Guard" is an anime television series, produced and animated by XEBEC, and directed by Seiji Mizushima. It aired from October 5, 1999 to March 28, 2000 on TV Tokyo, ran for 26 episodes. 6 volumes of videos were released on VHS and DVD. The series also had a very brief run (two episodes) on Cartoon Network through Toonami's "Giant Robot Week." " This is so simple, I try it with Elastic.js, the query works but I can't make it with facetsview that will make me craaaaaazy! @.@ |
Do you have some backend code to support queries arriving at extremsearch.cloudapp.net/query? The example in facetview is sending that query to an instance of bibserver - http://github.com/okfn/bibserver - which does have code to handle requests to /query. It validates them then passes them through to our index with some tweaking as required for our own apps. If you have written some backend code but are not getting back what you expect, check that you are properly handling JSONP, or you will not succeed in requesting the data from cross-domain sources. Have a look at the bibserver code mentioned above if you want to see how to do this in python. However if you do not have code to handle the /query endpoint, it should work just as well sending direct to your elasticsearch _search endpoint. |
Your FacetsView is really great!
But I try to do it, in my own website, but I can't make any request, because my URL is like "http://extremesearch.cloudapp.net:9200/turbomanga/manga".
And I wanna know how to make request in a adresse like that, cause in FacetsView you have "http://bibsoup.net/query?"
So I wanna know how I can make request in my website! I was thinking about change default_url_params, but I failed!
Thx for your job, and to listen me! x) (Sorry if my english is bad...)
The text was updated successfully, but these errors were encountered: