Git Product home page Git Product logo

Comments (3)

jpmckinney avatar jpmckinney commented on July 25, 2024

Noting that there is some code that's been shared on the mailing list (and that is in the AutocompleteTermWidget) for accomplishing this.

from ajax-solr.

Daniel15 avatar Daniel15 commented on July 25, 2024

I had to do something similar and used code that looked a bit like this:

// Clone the current parameter store
var newStore = new AjaxSolr.ParameterStore();
newStore.parseString(this.manager.store.string());
// ... do stuff with newStore ...

this.manager.executeRequest('handler_name', newStore.string(), function (data) {
    // Process the data in here
});

from ajax-solr.

jpmckinney avatar jpmckinney commented on July 25, 2024

Thanks @Daniel15 ! I've created a tutorial based on this: https://github.com/evolvingweb/ajax-solr/wiki/Tutorial:-Send-a-Solr-request-without-updating-widgets

Since every developer will want to make different changes to the parameter store, I think it's easier for a developer to use the 3-4 lines of code from the tutorial, than to learn how to use a new ajax-solr API, which would have to look like:

this.manager.sideRequest('select', function (store) {
  // receives a fresh parameter store, makes modifications to it.
}, function (data) {
  // receives Solr response data, does stuff with it.
});

That's worse than what people can do now:

var store = new AjaxSolr.ParameterStore();
// Make modifications to the parameter store.
this.manager.executeRequest('select', store.string(), function (data) {
  // receives Solr response data, does stuff with it.
});

In other words, it's not possible to make side requests easier than they already are.

from ajax-solr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.