-
Notifications
You must be signed in to change notification settings - Fork 1
/
GoogleCSEInstructions.txt
26 lines (23 loc) · 2.04 KB
/
GoogleCSEInstructions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
To create a custom search engine for use with nlp2code, perform the following steps:
(You will need a google account for this)
1. Navigate to https://cse.google.com.au/cse/
2. Click "Create a custom search engine".
3. In the sites to search text box, enter: http://stackoverflow.com/
4. In the name of the search engine text box, enter any name you want.
5. Click the Control Panel button.
6. Click on the Search engine ID button and copy and store this somewhere for later.
7. Navigate to https://console.developers.google.com/
8. Accept the Terms of Service. You can decline the E-mail updates section. Press Agree and Continue.
9. Create a new project by navigating to My Project->Create project.
10. In the API Manager tab on the left, navigate to Dashboard.
11. In the search bar, search for "custom search" and click Custom Search API.
12. Click the Enable button to enable the custom search API.
13. In the API Manager tab on the left, navigate to Credentials.
14. Click Create->API key to create an api key.
15. Copy the API key on the screen and store this somewhere for later.
16. Navigate to your local Eclipse installation and go into the configuration folder in the root directory.
17. Find the folder cs.adelaide.nlp2code and the file preferences.txt.
18. Open preferences.txt and next to the "APIKEY=" part, paste the API key you saved in step 12 (replace the one that is there already).
19. In preferences.txt still, next to the "CUSTOM_SEARCH_ID=" part, paste the search engine ID you saved in step 6 (replace the one that is there already).
20. All Done! The next time you load up the nlp2code plugin in eclipse, it should load up the new search engine information.
Note that for this configuration, you only get 100 queries per day. This is because Google limits API calls to 100 per day if it is being used for free. After 100 queries, other queries will fail saying that there is a connection problem. To increase this quota, you need to navigate to your custom search engine on https://cse.google.com.au/cse/ and go to billing to pay for more queries per day.