Created
March 1, 2012 20:02
-
-
Save brikis98/1952715 to your computer and use it in GitHub Desktop.
Cleo: the open source technology behind LinkedIn typeahead search
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -v -X POST -H "Content-type: application/xml" -H "Accept: application/xml" http://localhost:8080/cleo-primer/rest/elements/_ -d ' | |
| <element> | |
| <id>1063</id> | |
| <name>Google Inc. (GOOG)</name> | |
| <title>Technology - Computer Software: Programming Data Processing</title> | |
| <url>http://www.nasdaq.com/symbol/goog</url> | |
| <score>159350</score> | |
| <term>google</term> | |
| <term>inc.</term> | |
| <term>goog</term> | |
| </element> | |
| ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -v -X POST -H "Content-type: application/xml" -H "Accept: application/xml" http://localhost:8080/cleo-primer/rest/elements -d ' | |
| <element-list> | |
| <element> | |
| <id>1063</id> | |
| <name>Google Inc. (GOOG)</name> | |
| <title>Technology - Computer Software: Programming Data Processing</title> | |
| <url>http://www.nasdaq.com/symbol/goog</url> | |
| <score>159350</score> | |
| <term>google</term> | |
| <term>inc.</term> | |
| <term>goog</term> | |
| </element> | |
| <element> | |
| <id>1253</id> | |
| <name>Intel Corporation (INTC)</name> | |
| <title>Technology - Semiconductors</title> | |
| <url>http://www.nasdaq.com/symbol/intc</url> | |
| <score>129668</score> | |
| <term>intel</term> | |
| <term>corporation</term> | |
| <term>intc</term> | |
| </element> | |
| </element-list> | |
| ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -v -X DELETE http://localhost:8080/cleo-primer/rest/elements/1063 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -v -X GET -H "Accept: application/json" http://localhost:8080/cleo-primer/rest/elements | |
| curl -v -X GET -H "Accept: application/xml" http://localhost:8080/cleo-primer/rest/elements |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -v -X GET -H "Accept: application/json" http://localhost:8080/cleo-primer/rest/elements/1063 | |
| curl -v -X GET -H "Accept: application/xml" http://localhost:8080/cleo-primer/rest/elements/1063 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -v -X GET -H "Accept: application/json" http://localhost:8080/cleo-primer/rest/elements/1..100 | |
| curl -v -X GET -H "Accept: application/xml" http://localhost:8080/cleo-primer/rest/elements/1..100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -v -X GET -H "Accept: application/json" http://localhost:8080/cleo-primer/rest/elements/search?query=goo | |
| curl -v -X GET -H "Accept: application/xml" http://localhost:8080/cleo-primer/rest/elements/search?query=goo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -v -X PUT -H "Content-type: application/xml" -H "Accept: application/xml" http://localhost:8080/cleo-primer/rest/elements/1063 -d ' | |
| <element> | |
| <id>1063</id> | |
| <name>Google Inc. (GOOG)</name> | |
| <title>Technology - Computer Software: Programming Data Processing</title> | |
| <url>http://www.nasdaq.com/symbol/goog</url> | |
| <score>159350</score> | |
| <term>google</term> | |
| <term>inc.</term> | |
| <term>goog</term> | |
| </element> | |
| ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ./scripts/post-element-list.sh dat/nasdaq-company-list.xml | |
| ./scripts/post-element.sh dat/nasdaq-google.xml dat/nasdaq-intel.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MAVEN_OPTS="-Xms1g -Xmx1g" mvn jetty:run \ | |
| -Dcleo.instance.name=Company \ | |
| -Dcleo.instance.type=cleo.primer.GenericTypeaheadInstance \ | |
| -Dcleo.instance.conf=src/main/resources/config/generic-typeahead |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See Cleo: the open source technology behind LinkedIn's typeahead search for more info.