Navigation Menu

Skip to content

Commit

Permalink
Fix plugins order
Browse files Browse the repository at this point in the history
Wrapper plugins such as "groonga" that includes "select" command that
wraps "search" command should be specified before base plugins such as
"search".
  • Loading branch information
kou committed Feb 7, 2014
1 parent 848f501 commit 44bb35b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reference/catalog/index.md
Expand Up @@ -130,7 +130,7 @@ Here is a `catalog.json` for the above case:
"datasets": {
"Wiki": {
"workers": 4,
"plugins": ["crud", "search", "groonga"],
"plugins": ["groonga", "crud", "search"],
"number_of_replicas": 2,
"number_of_partitions": 2,
"partition_key": "_key",
Expand Down

5 comments on commit 44bb35b

@piroor
Copy link
Contributor

@piroor piroor commented on 44bb35b Feb 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really? The tutorial http://droonga.org/tutorial/plugin-development/adapter/ works correctly for me, with the order ["crud", "search", "groonga", "sample-logger"]. The plugin sample-logger modifies requests for the search command.

@kou
Copy link
Contributor Author

@kou kou commented on 44bb35b Feb 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really. Because the current search plugin doesn't provide any adapters. If search provides any adapters, the tutorial doesn't work well.

The tutorial works well for now. But it may not be worked in the feature. So it is a good manner to use ["sample-logger", "search"] order.

@piroor
Copy link
Contributor

@piroor piroor commented on 44bb35b Feb 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I update tutorials.

By the way, I think we should resolve the order of plugins automatically in future releases, like gem, npm, and so on...

@kou
Copy link
Contributor Author

@kou kou commented on 44bb35b Feb 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, I think we should resolve the order of plugins automatically in future releases, like gem, npm, and so on...

!!!
It will be difficult...
Authors of plugin that has adapter for input need to specify "the plugin will convert the input message to XXX from YYY". The "XXX" and "YYY" is not only "type" field but also all message fields because adapter can use all message fields to find a message to be adapted.
We need the information to resolve the order of plugins...

@piroor
Copy link
Contributor

@piroor piroor commented on 44bb35b Feb 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think plugin authors should write any metadata to describe its dependencies manually, and it seems to be a responsibility of plugin authors.

Please sign in to comment.