Hello Everyone,
I have been using doxygen for years, but just recently tried to get the external indexing to work. I have very carefully followed the directions here: https://www.doxygen.nl/manual/extsearch.html, and set up a clean linux server with apache just for testing this feature.
The place I have been stuck on for many days now is that when I do a search from the search box on the html page, I a page with the title Search Results is display, but it is completely blank. This is what I know so far:
- Running doxygen 1.8.20
HTML is generated on windows 10. Server is linux (Amazon AWS) using doxysearch.cgi
Tried converting searchdata.xml conversion with doxyindexer both from windows and on linux with same non-working results
If I do a html search for something I know is not in the index, the I get the proper "Sorry, no documents matching your query.".
By debugging/stepping through the search.js code I think I see the problem. When using the html search on a value that is in the index, function(data) is never executed. But when something is not in the index, it is.
Here is a snippet from the javascript debugger with a breakpoint at the function:
Here the values are: query = "timer", page = 0, count = 20. If I stop at this breakpoint, and change the value of page from 0 to 1, the page renders with all the correct results. In the case were the search term is not in the index, all the values are 0.
I also used wireshark packet capture and verified all the correct data was being sent from the server to the client, the same data I see when I do the manual URL test.
This really has me stuck, any ideas or comments are greatly appreciated. In the end what I'm looking for is a much better search function than the default. To summarize:
- Get proper output when a search term is not in the index
- Works with URL encoding with doxysearch.cgi
- Search Result page is blank when a search is done with a term that is in the index
Last edit: Tom Williams 2021-01-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Found out a little more information. In search.js the $.getJSON(serverUrl+"?cb=?",...) function does not result in any "data" to process. The data variable is null.
Narrowed it down. On the page 0 search for 20 entries, it gets to number 8 and doxysearch throws an error. This is the last entry, number 7, from the query, and the error message.
{"type": "page",
"name": "examplesPage::examplePlatformSpecificGroup::platformExamples-MCF::examplePulseGeneratorAndCounter-MCF",
"tag": "",
"url": "example_pulse_generator_and_counter.html",
"fragments":[
"... generate a waveform output on one <spanclass=\"hl\">timer</span> and use the <spanclass=\"hl\">timer</span> capture feature...",
"... generate a waveform output on one <spanclass=\"hl\">timer</span> and use the <spanclass=\"hl\">timer</span> capture feature...",
"... generate a waveform output on one <spanclass=\"hl\">timer</span> and use the <spanclass=\"hl\">timer</span> capture feature..."
]
},
({"error":"Unknown Exception!"})
Hello Everyone,
I have been using doxygen for years, but just recently tried to get the external indexing to work. I have very carefully followed the directions here: https://www.doxygen.nl/manual/extsearch.html, and set up a clean linux server with apache just for testing this feature.
The place I have been stuck on for many days now is that when I do a search from the search box on the html page, I a page with the title Search Results is display, but it is completely blank. This is what I know so far:
- Running doxygen 1.8.20
HTML is generated on windows 10. Server is linux (Amazon AWS) using doxysearch.cgi
Tried converting searchdata.xml conversion with doxyindexer both from windows and on linux with same non-working results
If I do a html search for something I know is not in the index, the I get the proper "Sorry, no documents matching your query.".
If I do a command line test for "timer", things work fine: http://myserver/cgi-bin/doxysearch.cgi?q=timer&n=20&p=1&cb=dummy. I can see the JSON and all the appropriate results. The first few lines are:
Here is a snippet from the javascript debugger with a breakpoint at the function:
Here the values are: query = "timer", page = 0, count = 20. If I stop at this breakpoint, and change the value of page from 0 to 1, the page renders with all the correct results. In the case were the search term is not in the index, all the values are 0.
I also used wireshark packet capture and verified all the correct data was being sent from the server to the client, the same data I see when I do the manual URL test.
This really has me stuck, any ideas or comments are greatly appreciated. In the end what I'm looking for is a much better search function than the default. To summarize:
- Get proper output when a search term is not in the index
- Works with URL encoding with doxysearch.cgi
- Search Result page is blank when a search is done with a term that is in the index
Last edit: Tom Williams 2021-01-10
Found out a little more information. In search.js the $.getJSON(serverUrl+"?cb=?",...) function does not result in any "data" to process. The data variable is null.
However, if the searchFor(query, 0, 20) function changes the page from 0 to 1, searchFor(query, 1, 20), then the data variable contains:
data = {hits: 100, first: 20, count: 20, page: 1, pages: 5, …}
like it should, so the page can be displayed.
Narrowed it down. On the page 0 search for 20 entries, it gets to number 8 and doxysearch throws an error. This is the last entry, number 7, from the query, and the error message.
Looks like its coming from doxysearch.cpp: