Skip to content
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

custom document processing pipe without touching norch? #153

Open
eklem opened this issue Aug 29, 2017 · 6 comments
Open

custom document processing pipe without touching norch? #153

eklem opened this issue Aug 29, 2017 · 6 comments

Comments

@eklem
Copy link
Collaborator

eklem commented Aug 29, 2017

I was thinking that it could be good to choose different custom document processors when adding documents. This could be done by (almost) not touching norch code.

Could be done by adding the document processors as dependencies in package.json and then calling them from command line:

Here a twitter document processor is inserted before it's added to the index.

curl -X POST -p twitterPipeline -d @justTen.str http://localhost:3030/add
@fergiemcdowall
Copy link
Owner

It should be possible to use unix pipes:

cat data.json | twitterPipeline | curl -H "Content-Type: application/json" -X POST -d @- http://localhost:3030/add

@eklem
Copy link
Collaborator Author

eklem commented Aug 29, 2017

Ah, nice!
A little unclear issue. I was also thinking of when the post request comes from i.e. Zapier and I can only rely on the regular /add functionality. A way to get Norch to choose one of a set of custom pipelines is what I'm looking for.

@fergiemcdowall
Copy link
Owner

Yup- I see what you mean- what should the API look like?

@eklem
Copy link
Collaborator Author

eklem commented Aug 29, 2017

Hmm, maybe something could be sent as header key/value pair:
customPipeline | [source]
screen shot 2017-08-29 at 12 53 18

@eklem
Copy link
Collaborator Author

eklem commented Aug 29, 2017

I need to fix a bug in a demo, but I can see what this looks like on the norch server side and get back to you.

@eklem
Copy link
Collaborator Author

eklem commented Aug 29, 2017

Could be done through the JSON, but that's a bit ugly.

@fergiemcdowall fergiemcdowall added this to the v1.x.x milestone Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants