Comments (3)
I like the idea though detecting versioning systems might be challenging since there are a number of plugins for git/hg. Not sure there is a universal solution.
Right now it will periodically reindex files that changed in the workspace once Eclipse detects that they've changed. There will be some lag after changing branches but the re-indexing period can be configured in preferences InstaSearch.java#L68. Perhaps tuning that helps in your case.
And there is always the option to manually trigger Re-Indexing with the button from the toolbar.
from eclipse-instasearch.
I don't think that you should use any of the existing mercurial or git plugins to implement this feature.
In theory you should only need to execute a single mercurial or git command to detect that there has been a revision change ('hg id' in the case of mercurial and 'git log -1 --format="%H"' in the case of git). Thus it does not seem such a bad idea to simply execute the command and parse the command output. These commands are so common that they are extremely unlikely to ever change (in the case of mercurial it is guaranteed to never change, since mercurial never changes its command line "API").
So my proposal is to execute these commands relatively often (e.g. once every 10 or 15 seconds or so), and if their output changes then it means that a full reindex is needed.
As for the periodic reindex that you mention, what do you mean when you say "once Eclipse detects that they've changed"? I thought that instasearch would simply reindex all files every period?
from eclipse-instasearch.
Yes, InstaSearch re-indexes only files that have changed. Eclipse provides an api to listen for file changes and then every X seconds InstaSearch will re-index those that changed. Indexing job is scheduled here InstaSearch.java#L75.
So, if everything works correctly, we shouldn't need to execute additional commands because Eclipse will tell the plugin about files that changed.
Another thing is that you shouldn't need a full re-index when switching branches because just a few files might have changed.
I'd encourage you to lower the re-indexing interval to, say, 5 seconds and see if within 10-15 seconds of switching branches new files appear in search results. If they don't then it could be a bug.
from eclipse-instasearch.
Related Issues (20)
- incompatible HOT 10
- Sorry, I have difficulties to setup up development environment in Eclipse.
- Use default value for "Match highlight background color" instead of custom. HOT 6
- Another Error creating index HOT 7
- Bug: update index progtess blocks (maven) builds HOT 6
- Possible to find files (by filename) inside .jar file? HOT 4
- Unable to install plugin manually or through eclipse marketplace on eclipse mars HOT 2
- java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
- Support adding new extension for indexing HOT 1
- Turning off "Find similar matches when no exact matches found" option does not work
- Unresponsive eclipse neon when accessing search view from instasearch HOT 1
- Change key-bind? HOT 2
- Feature Request: Add option to search non java resources inside Jars HOT 4
- Invisible Instasearch on Eclipse Neon.3 (4.6.3) HOT 8
- Lock obtain timed out HOT 2
- Feature Request: Add option to Reindex Project dependent.
- can we initialize the search with the current element where the cursor is?
- No idea how to do a search HOT 3
- New build on marketplace HOT 3
- Request: Create a License HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eclipse-instasearch.